Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow authorization before_action using given permission #17503

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

oliverguenther
Copy link
Member

With more and more smaller actions that happen on controllers for e.g., turbo-specific actions, adding all of them in the engine is becoming cumbersome and harder to understand.

Instead, this PR suggests to allow authorization to happen on permissions, not only actions. This was possibly already but required us to manually whitelist the action from the default authorization checks. By providing two helper methods, we can re-use most of the same logic but extend them for permissions.

@oliverguenther oliverguenther force-pushed the refactor/authorize-on-permission branch from 9ab5318 to 5e5fa5f Compare December 19, 2024 10:24
@oliverguenther oliverguenther merged commit d81bd36 into dev Dec 20, 2024
12 checks passed
@oliverguenther oliverguenther deleted the refactor/authorize-on-permission branch December 20, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants