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

Add authorization #10

Merged
merged 6 commits into from
Oct 5, 2023
Merged

Add authorization #10

merged 6 commits into from
Oct 5, 2023

Conversation

AnsarIbrahim
Copy link
Collaborator

This PR Contains:

Project requirements

  • Install CanCanCan in your project.✅

  • Add a role column to the users table. Remember to use a migration for this.✅

  • A user can delete a post if it is theirs or if they have an admin role (column role has value "admin"). Use CanCanCan for this authorization.✅

  • For that you need to implement the post deleting functionality. Add the "Delete" button to the view and make sure that only authorized users can see it.✅

  • A user can delete a comment if it is theirs or if they have an admin role (column role has value "admin"). Use CanCanCan for this authorization.✅

  • For that you need to implement the comment deleting functionality. Add the "Delete" button to the view and make sure that only authorized users can see it.✅

@marvin-nyalik marvin-nyalik merged commit 924e6a7 into dev Oct 5, 2023
3 checks passed
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.

2 participants