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

Agency Admin needs to be able to insert to MenuData #155

Closed
Sheeri opened this issue Oct 1, 2020 · 2 comments
Closed

Agency Admin needs to be able to insert to MenuData #155

Sheeri opened this issue Oct 1, 2020 · 2 comments
Assignees
Labels
days: 0.25 Estimated to take a quarter of a day to implement documentation Improvements or additions to documentation

Comments

@Sheeri
Copy link
Collaborator

Sheeri commented Oct 1, 2020

When trying to add menu data from the sandbox web ui, I was seeing behavior where the data did not appear to save.

The logs showed:
role "Agency Admin" in "wildaid.MenuData" does not have insert permission for document with _id: ObjectID("5f753...034")

Under Rules -> mongodb-atlas -> Agency Admin role, the "Write" checkbox was selected but when I edited (with the pencil) I saw that only 'Search Documents" was checked, not "Insert Documents" (nor "Delete Documents").

I checked "Insert Documents" and hit SAVE and tried again, and this time my menu data saving worked.

Agency Admin at least needs Insert Documents privilege, at least until the new code to give default menu items is completed. If we decide we don't want Insert Documents, we will have to revoke the privilege in the sandbox environment.

@am-MongoDB am-MongoDB self-assigned this Oct 1, 2020
@am-MongoDB am-MongoDB added bug Something isn't working days: 0.25 Estimated to take a quarter of a day to implement documentation Improvements or additions to documentation and removed bug Something isn't working labels Oct 1, 2020
@am-MongoDB
Copy link
Collaborator

The functionality is correct for non-sandbox mode, but we should either update the docs to manually add insert permissions when setting up a sandbox (alternatively, and maybe better add a trigger on the Agency collection to automatically bootstrap a MenuData document when creating a new agency) – that Trigger can be run as system, which skips the rule checking

@Sheeri
Copy link
Collaborator Author

Sheeri commented Oct 2, 2020

Docs on how to set up a sandbox are a good idea - and low priority. I have created WildAid/wildaid.github.io#75 to capture what needs to be documented.

@Sheeri Sheeri closed this as completed Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
days: 0.25 Estimated to take a quarter of a day to implement documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants