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

Permissions issue #155

Closed
martin-hajek opened this issue Feb 9, 2025 · 5 comments
Closed

Permissions issue #155

martin-hajek opened this issue Feb 9, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@martin-hajek
Copy link
Contributor

martin-hajek commented Feb 9, 2025

I was invited to join a project. At first I had only a limited number of permissions (standard for a new member).
Then I was granted all permissions. I created a new category without any problems. However, after adding a code to the category, a warning message popped up that I did not have sufficient permissions to make changes to the codes or categories created by others. Nevertheless, the action was executed on the front-end and the code was added to the category.

In the Analysis page, the newly created categories show up but do not filter segments.
After restarting the session the categories still exist but they are empty, without codes. It means that codes were not added to the categories in the database.

@martin-hajek martin-hajek added the bug Something isn't working label Feb 9, 2025
@hlageek
Copy link
Contributor

hlageek commented Feb 9, 2025

Sounds like this issue would only occur if the project owner changes permissions while project member is in active seesion without reload If you repeat the same action now, the codes-categories behave as expected?

@martin-hajek
Copy link
Contributor Author

The issue still persists even after reload.
I cannot exclude the possiblity that we were both in active session when the permissions were changed, but yes, it shouldn't persist indefinitely.

@hlageek
Copy link
Contributor

hlageek commented Feb 9, 2025

Potentially tracked to observer for input$edges_category in mod_categories.R, where we first check for narrow condition (codebook_modify == 1) before checking for broader condition codebook_other_modify == 1. The order should be reversed - first check broader condition and execute if satisfied, else check narrow condition and execute, else abort if neither of the permissions is sufficient. #TODO

Edit:
This is not necessarily the correct way to go about it. If narrow condition is satisfied, there is no need for checking the broader one. But in case, the logic has to be fixed to work as expected.

@hlageek hlageek self-assigned this Feb 9, 2025
@hlageek hlageek mentioned this issue Feb 9, 2025
11 tasks
hlageek added a commit that referenced this issue Feb 10, 2025
updated logic for permission checks when creating and deleting code-category edges
@hlageek
Copy link
Contributor

hlageek commented Feb 10, 2025

If @martin-hajek can check the bugfix with
devtools::install_github("RE-QDA/requal@codebook_permissions_fix")
then please report success in #156.

@martin-hajek
Copy link
Contributor Author

Tested and works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants