Error
AssertionError: Insufficient permission to get the form
AssertionError: Insufficient permission to get form source info
The critical bug is odd, and seems to relate to DB roles and public form share URLs. The public share URLs for some forms will return a 500 error: Here are the reproduction steps:
docker run -it --name mathesar-050 -p 8000:8000 mathesar/mathesar:0.5.0
Here are the first frames of relevant log output when attempting to view the public form page:
modernrpc.exceptions.RPCException: [-28009] DoesNotExist: Form matching query does not exist.
at /code/mathesar/rpc/exceptions/handlers.py:25 in _raise_generic_error
caused by /code/mathesar/rpc/forms.py:268 in get
-> form_model = get_form(form_token, user)
modernrpc.exceptions.RPCException: [-31002] AssertionError: Insufficient permission to get the form
at /code/mathesar/rpc/exceptions/handlers.py:25 in _raise_generic_error
caused by /code/mathesar/utils/forms.py:145 in get_form
-> assert has_permission_for_form(user, form_model), 'Insufficient permission to get the form'
modernrpc.exceptions.RPCException: [-31002] AssertionError: Insufficient permission to get form source info
at /code/mathesar/rpc/exceptions/handlers.py:25 in _raise_generic_error
caused by /code/mathesar/utils/forms.py:152 in get_form_source_info
-> assert has_permission_for_form(user, form_model), 'Insufficient permission to get form source info'
- Disabled share links continue to display and work (data can be submitted) in the current logged-in session.
- Disabled share links display a vague error message to the end user:
Error AssertionError: Insufficient permission to get the form AssertionError: Insufficient permission to get form source info