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

duplicate entries allowed in permissions table #141

Open
esskayesss opened this issue May 25, 2023 · 1 comment
Open

duplicate entries allowed in permissions table #141

esskayesss opened this issue May 25, 2023 · 1 comment
Labels
bug Something isn't working hacktoberfest Suitable Hacktoberfest contribution

Comments

@esskayesss
Copy link
Contributor

image

as shown in the screenshot,
I have noticed that the application allows for duplicate entries in the permissions table. For example, as a superuser, I can add multiple superuser permissions for myself. This behavior can lead to confusion and potential security issues.

Steps to reproduce

  1. Log in as a superuser
  2. Add a new superuser permission for yourself
  3. Verify that the new permission is added successfully
  4. Add another superuser permission for yourself with the same recipient ID
  5. Verify that the new permission is added successfully, creating a duplicate entry

Expected behavior

The application should prevent duplicate entries in the permissions table to ensure data integrity and prevent potential security issues.

image

@crazyscientist
Copy link
Collaborator

Thank you for reporting this 🙂

There is already a unique-constraint in place, but apparently it does not have the intended effect when obj_type and obj_id are null.

@crazyscientist crazyscientist added the bug Something isn't working label Jun 1, 2023
@crazyscientist crazyscientist added the hacktoberfest Suitable Hacktoberfest contribution label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest Suitable Hacktoberfest contribution
Projects
None yet
Development

No branches or pull requests

2 participants