amitNielsen opened a new issue #10408:
URL: https://github.com/apache/incubator-superset/issues/10408


   
   
   ## [SIP] Proposal for Dashboard Access Permissions
   
   ### Motivation
   
   As a dashboard provider in an organisation with many subgroups inside I need 
the ability manage user access to dashboards and different levels of 
permissions(Viewer,Editor)
   
   ### Proposed Change
   
   Create permissions for each dashboard with the format "dashboard 
(viewer/editor) access on dashboard_title [dashboard_id]"
   The name of the permission is updated if the dashboard title is changed.
   Add a dashboard permission to a role via the Edit Role form, or, for 
convenience, add a role to a dashboard via the Edit Dashboard form.
   The permissions "all_dashboard_viewer_access" and 
"all_dashboard_editor_access" is added to Admin, Alpha, and Gamma roles.
   To allow private dashboards, remove "all_dashboard_access" from a role. This 
role will then only have access to the dashboards specified. Add a dashboard's 
permission to a role to "publish" it.
   Note that these permissions do not apply to slices. To make the data in a 
dashboard truly private, use dashboard permissions with a read only role that 
has no slice/explore access.
   
   ####**FAB permission view mechanism**
   Use **FAB permission view** mechanism to have new permissions named 
**dashboard read/edit access**
   and for every dashboard there would be a matching **view_menu** instance 
that can be used a permission_view and be assigned into Roles:
   
   
[![](https://mermaid.ink/img/eyJjb2RlIjoiZ3JhcGggVERcblx0QVtkYXNoYm9hcmQgaW5zdGFuY2VdIC0tPnxoYXMgYSBtYXRjaGluZ3wgQihhYl92aWV3X21lbnUpXG5cdEIgLS0-IHxmb3JtIHRvZ3RoZXJ8IEN7cGVybWlzc2lvbl92aWV3fVxuICAgIERBW2Rhc2hib2FyZCByZWFkIGFjY2Vzc10tLT58aW5zdGFuY2Ugb2Z8IGFiX3Blcm1pc3Npb25cblx0REVBW2Rhc2hib2FyZCBlZGl0IGFjY2Vzc10tLT58aW5zdGFuY2Ugb2Z8IGFiX3Blcm1pc3Npb25cbiAgICBhYl9wZXJtaXNzaW9uIC0tPiB8Zm9ybSB0b2d0aGVyfCBDe2FiX3Blcm1pc3Npb25fdmlld31cblx0QyAtLT58dXNlZCBpbnwgRFthYl9wZXJtaXNzaW9uX3ZpZXdfcm9sZV0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ)](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggVERcblx0QVtkYXNoYm9hcmQgaW5zdGFuY2VdIC0tPnxoYXMgYSBtYXRjaGluZ3wgQihhYl92aWV3X21lbnUpXG5cdEIgLS0-IHxmb3JtIHRvZ3RoZXJ8IEN7cGVybWlzc2lvbl92aWV3fVxuICAgIERBW2Rhc2hib2FyZCByZWFkIGFjY2Vzc10tLT58aW5zdGFuY2Ugb2Z8IGFiX3Blcm1pc3Npb25cblx0REVBW2Rhc2hib2FyZCBlZGl0IGFjY2Vzc10tLT58aW5zdGFuY2Ugb2Z8IGFiX3Blcm1pc3Npb25cbiAgICBhYl9wZXJtaXNzaW9uIC0tPiB8Zm9ybSB0b2d0aGVyfCBDe2FiX3Blcm1pc3Npb25fdmlld
 
31cblx0QyAtLT58dXNlZCBpbnwgRFthYl9wZXJtaXNzaW9uX3ZpZXdfcm9sZV0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ)
   
   Users will be validated with the necessary permissions when fetching 
dashboards(specific or list)  and will be rejected if they don't have them
   
   #### dashboard edit access (UI & BE)
   ![image 
info](https://lh3.googleusercontent.com/TkiC5vgRSO5HLymvvet0KOhq6zc59nUXc6tGUNqQcgpbVaYyRhGtScUJ5ihqQBeYWQ3MKlvhqAySRyf7HggqBBbLN7u44rRwqsXhawSPhO4hBW93EFoZjoVUhvE-kSi4fMLp5DgYicKX8u7YR8mLGguk5cxUcK58W4SxMYJm3YdpB69TNscOkuzfvScYk2p9bnCwbTlVX-zoSzj1b5aAH3afXXAUTB_SCXRMCRw-qGrAgb6zDfJD4io4_7S1Ch278aHOF5yKJQPYGrewwbAn19cUDytWlr6_HiG_lxhGY41jLqUcpeg5lZVhAipyi_4HG5oU_edOJpJL8UrDiUHMZ4_kc2Nz58wuP-mX_ZVgWT52jHftzmXacvcI7YFtWM6v-IJwyde0s2zg01WaFuXp_ftUICm6vzuPMbt3hti-gEw0-UtEeudVzjxuVLEOQJJvHLRI8j6jMMFTJCNGuunI42azaJGMm7dxXJDT7Sy6L6UAq0NRrLNgJPdQIPLCi5AUfQYSrDsMrdkM4eAtF_nRMV-Wg_jWXK16pXH8ZQNAOBMBUzB-AhUUseoRC2K3PrayyEPyts3SgWlZUMXGlENlsfCFTj9ySkU2ZboM7t1kv8OOm8hqXCdGYNQ17cz2-iru-X5sfdPJ3yqbTO_NgGA0G-4sobwlfdrvLiGF9PybCIevL8knfVM_w9jlz7zHeQ=w210-h66-no?authuser=0)
   
   *edit dashboard button* will be hidden if user doesn't have edit access for 
the requested dashboard
   
   save dashboard endpoints will also validate for permissions
   
   
   ### New or Changed Public Interfaces
    #### the following endpoints logic will need to validate dashboard 
viewer/editor access
   
       BaseSupersetView <-- Dashboard endpoints:
           GET dashboard/new/  -  create new empty dashboard
       SupersetModelView <-- DashboardModelView endpoints:
           GET /dashboard/list,  get all dashboards
       BaseSupersetView <-- Superset endpoints:
           POST dashboad/save_dash/{} ,
           POST GET /dashboard/{}/published
           GET /dashboard/{} - get specific dashboard
       BaseSupersetModelRestApi <-- DashboardResetApi endpoints
           POST,PUT,DELETE,GET /api/v1/dashboard/
   
   ### New dependencies
   
   none
   
   ### Migration Plan and Compatibility
   
   create relevant permissions for all existing dashboards
   assign "all_dashboard_viewer_access" and "all_dashboard_editor_access" to 
Admin, Alpha, and Gamma roles
   
   ### Rejected Alternatives
   
   none
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to