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

Blog app: add authorization rules #12

Merged
merged 12 commits into from
Feb 2, 2023
Merged

Blog app: add authorization rules #12

merged 12 commits into from
Feb 2, 2023

Conversation

Baayeh
Copy link
Owner

@Baayeh Baayeh commented Feb 2, 2023

Limiting access to web app resources based on authorization rules.

In this PR, I completed the following tasks:

  • Installed CanCanCan in the project.
  • Added a role column to the users table.
  • Allowed a user to delete a post if it is theirs or if they have an admin role.
  • Added the Delete button to the view and made sure that only authorized users can see it.
  • Allowed a user to delete a comment if it is theirs or if they have an admin role.
  • Added the Delete button to the view and made sure that only authorized users can see it.

@Baayeh Baayeh merged commit 45620d5 into dev Feb 2, 2023
@Baayeh Baayeh deleted the authorization branch February 2, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant