Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add: share modify/access permissions for queries and dashboard #1113
This PR allows users to share edit permissions for a given query or dashboard. This feature request has previously been discussed here.
To manage the access permissions, a modal dialog is used (similar to the dialog used for managing group members). To give an existing user "modify" access, the user can simply be selected from the search/dropdown list. To revoke access, use the "Remove" button and changes will be effected immediately. Note that the same modal code (view and controller) is used for both, query permissions and dashboard permissions, to avoid code duplication.
At the core of the approach is a new table and model entity
The access permissions are handled via a new API endpoint
A set of tests has been added to cover the basic functionality of managing access permissions.
Hey @arikfr, we've carefully considered the feedback and refactored the implementation based on your suggestions.
The major changes are around adding the
The PR is now ready for a second round of review. Looking forward to receiving more feedback. Cheers.
arikfr left a comment
Did another pass at the code , this time along with the frontend code.
I guess some of the comments might seem about semantics only (like the name changes), but as the person who will need to maintain in the future, it's important...
Also we need to add more tests to cover the change tracking/locking functionality. If you want, you're welcome to add me to your repo as a collaborator and I will add those (and maybe do some of the smaller changes).
I think that in the future, before doing such large change, I will just add you as a collaborator on
OK, I'm done (!). The UI for managing permissions is behind a feature flag and turned off by default. There are few "open" issues that we will address before we "graduate" this feature:
Anything I forgot?
I'm not merging this yet, as I want to merge a few other things first, but I will merge it tomorrow.
I haven't been able to pin it down, so these may not be correct as I may have performed other actions prior / in-between.
The first time I saved a dashboard (created prior to this patch) the message appeared.
Most of these were with a single user on the system, so any conflict is either from multiple tabs or bugs. It's still a frustrating dialog and really drags down the UX.
I think I know what happened in your case:
That's obviously not the intended behavior and will be fixed before wrapping up v0.12.
In normal situations you won't see this message often (or at all). I think one improvement we can introduce is to give you the option to override the changes anyway.
@ssoltane It's part of 0.12. As mentioned in the comments, the UI is disabled with a feature flag. You need to add the environment variable FEATURE_SHOW_PERMISSIONS_CONTROL and set it to
If you used our AMIs or bootstrap script, then just add this to the