Skip to content

Conversation

@hlageek
Copy link
Contributor

@hlageek hlageek commented Feb 10, 2025

Updated logic for permission checks when creating and deleting code-category edges

  • restructure the logic of checks
    • first check if user can modify codebook - abort if not
    • if TRUE, check if user can modify all edges
    • if TRUE, execute, else
    • check if user can edit own edges
    • if TRUE, check if the edited edge belongs to user
    • if TRUE, execute
    • else abort
      The same logic is applied to deletion of edges (previously no checks were performed)

updated logic for permission checks when creating and deleting code-category edges
@hlageek hlageek requested a review from skvrnami February 10, 2025 14:19
@hlageek hlageek mentioned this pull request Feb 10, 2025
@martin-hajek
Copy link
Contributor

Tested. [User A adds user B to the project with limited permissions. Logs out. User B log in and cannot see annotations of B. Logs out. Then A logs in again and gives all permissions to B. Logs out. B logs in and can create categories, populate them with codes and filter them in the Analysis.] Works fine.

@skvrnami skvrnami merged commit 53e63d4 into main Feb 11, 2025
8 checks passed
@skvrnami skvrnami deleted the codebook_permissions_fix branch February 11, 2025 20:17
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.

3 participants