-
Notifications
You must be signed in to change notification settings - Fork 81
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: user changed from DC to PU in a project is still able to add/edit/delete records #1008
Comments
Note: This occurs after a user has been made Data Collector for a project, then changed back to a Public User. |
Affects permissions for form downloads to ODK also. |
Note: I've investigated this for a bit and I think this bug is because the method that reassigns a user's project policy is never called when the user becomes a public user of the project. This method is called whenever the Our permissioning and roles functionality is quite a mess to be honest. I guess the quickest way to fix this bug is to call the policy reassigning method with the Alternatively, we can make Public User be a real role at the expense of having N×M Any thoughts from the other developers? |
@seav could you expand a bit on which parts are making it a mess? |
@wonderchook: I feel that how we have implemented our permissioning, policies, and roles is not consistent or as clean as it can be. The Public User pseudo-role, for instance, was bolted on when before we set that all org members are Project Users by default. As another example of inconsistency, we have code that checks a user's role in the organization or project before allowing some features when we should be really checking whether the user has the specific tutelary permission. I have already filed #815 and #816 before for this. If we try to check tutelary permissions all the time, then if ever we decide to, say, allow data collectors to download the project's data instead of just project managers, then we only need to update the data collector policy file instead of refactoring our code to provide an additional exception to data collectors. Right now, we check that the user is a project manager before showing the link to download the project's data. |
@seav is it worth writing out a decision record for this so we could plan to make things work better? |
I guess that can help. I was also thinking we can approach this in the same manner that Oliver approached cleaning up the API (#880). |
Adding to this: Removing a user from an organization isn't changing their permissions. I deleted a data collector and they can still add/edit/delete records. |
Steps to reproduce the error
(tested in demo)
Actual behaviour
See above
Expected behaviour
User is not able to submit, edit or delete any record
The text was updated successfully, but these errors were encountered: