Closed soloincc closed 1 year ago
When a user has no permission or no role, allow redirect to an alternative url instead of the login url.
A user might be signed in properly but accessing a forbidden resource, instead of being redirected to the login url, the user can be redirected to an alternative url where they are permitted
Thanks @soloincc , could you please add documentation and tests to this new behavior?
Please document too that redirect_url has precedence over redirect_to_login
and ROLEPERMISSIONS_REDIRECT_TO_LOGIN
@fjsj, I have added the documentation and tests
@soloincc
Thanks! I think we're missing one additional test case just for this behavior. On the test, set redirect_to_login
and check if redirect_url
overrides it. Could you please write this new test case?
Also, could you please allow me to edit the PR? Check: https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork
It seems I can't give you permissions to edit the PR since the repo is owned by an organisation. https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/about-forks
I have added the tests.
…gistered