gaurav1999 commented on issue #9421: [WiP] RFC: Test Permission converge
URL: 
https://github.com/apache/incubator-superset/pull/9421#issuecomment-606703533
 
 
   @dpgaspar ,
   I followed this process:
   1. Rest the branch as per the origin/master
   2. Modified the code
   (changes made in the diff)
   3. Made a fesh virt-env
   4. Installed deps
   5. pip install -e .
   6. superset db upgrade
   7. superset init
   8. flask fab security-converge
   9. superset run -p 8088
   
   Output of flask fab security-converge
   
   ```
   ^C gaurav  (e) env  ~  Projects  dup  incubator-superset  flask fab 
security-converge --dry-run
   INFO:superset.utils.logging_configurator:logging was configured successfully
   
/home/gaurav/Projects/dup/incubator-superset/env/lib64/python3.7/site-packages/flask_caching/__init__.py:189:
 UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively 
disabled.
     "Flask-Caching: CACHE_TYPE is set to null, "
   Computed security converge:
   Add to Roles:
   Where ('ChartRestApi', 'can_bulk_delete') add {('SliceModelView', 
'can_delete')}
   Where ('ChartRestApi', 'can_delete') add {('SliceModelView', 'can_delete')}
   Where ('ChartRestApi', 'can_info') add {('SliceModelView', 'can_list')}
   Where ('ChartRestApi', 'can_related') add {('SliceModelView', 'can_list')}
   Where ('ChartRestApi', 'can_get') add {('SliceModelView', 'can_list'), 
('SliceModelView', 'can_show')}
   Where ('ChartRestApi', 'can_post') add {('SliceModelView', 'can_add')}
   Where ('ChartRestApi', 'can_put') add {('SliceModelView', 'can_edit')}
   Where ('DashboardRestApi', 'can_export') add {('DashboardModelView', 
'can_mulexport')}
   Where ('DashboardRestApi', 'can_bulk_delete') add {('DashboardModelView', 
'can_delete')}
   Where ('DashboardRestApi', 'can_delete') add {('DashboardModelView', 
'can_delete')}
   Where ('DashboardRestApi', 'can_info') add {('DashboardModelView', 
'can_list')}
   Where ('DashboardRestApi', 'can_related') add {('DashboardModelView', 
'can_list')}
   Where ('DashboardRestApi', 'can_get') add {('DashboardModelView', 
'can_list'), ('DashboardModelView', 'can_show')}
   Where ('DashboardRestApi', 'can_post') add {('DashboardModelView', 
'can_add')}
   Where ('DashboardRestApi', 'can_put') add {('DashboardModelView', 
'can_edit')}
   Where ('DatabaseRestApi', 'can_table_metadata') add {('DatabaseView', 
'can_list')}
   Where ('DatabaseRestApi', 'can_get') add {('DatabaseView', 'can_list')}
   Where ('DatabaseRestApi', 'can_select_star') add {('DatabaseView', 
'can_list')}
   Where ('DatasetRestApi', 'can_export') add {('TableModelView', 
'can_mulexport')}
   Where ('DatasetRestApi', 'can_delete') add {('TableModelView', 'can_delete')}
   Where ('DatasetRestApi', 'can_info') add {('TableModelView', 'can_list')}
   Where ('DatasetRestApi', 'can_related') add {('TableModelView', 'can_list')}
   Where ('DatasetRestApi', 'can_get') add {('TableModelView', 'can_show'), 
('TableModelView', 'can_list')}
   Where ('DatasetRestApi', 'can_post') add {('TableModelView', 'can_add')}
   Where ('DatasetRestApi', 'can_refresh') add {('TableModelView', 'can_edit')}
   Where ('DatasetRestApi', 'can_put') add {('TableModelView', 'can_edit')}
   Where ('LogRestApi', 'can_post') add {('LogModelView', 'can_add')}
   Where ('LogRestApi', 'can_get') add {('LogModelView', 'can_list'), 
('LogModelView', 'can_show')}
   Del from Roles:
   ('LogRestApi', 'can_post')
   ('DashboardRestApi', 'can_post')
   ('DashboardRestApi', 'can_related')
   ('DashboardRestApi', 'can_put')
   ('DatabaseRestApi', 'can_select_star')
   ('DashboardRestApi', 'can_info')
   ('DatasetRestApi', 'can_get')
   ('DashboardRestApi', 'can_export')
   ('ChartRestApi', 'can_put')
   ('DashboardRestApi', 'can_delete')
   ('DatabaseRestApi', 'can_table_metadata')
   ('ChartRestApi', 'can_get')
   ('DashboardRestApi', 'can_bulk_delete')
   ('DatasetRestApi', 'can_post')
   ('DatasetRestApi', 'can_refresh')
   ('DatasetRestApi', 'can_info')
   ('DatasetRestApi', 'can_related')
   ('DatasetRestApi', 'can_export')
   ('LogRestApi', 'can_get')
   ('DatasetRestApi', 'can_put')
   ('ChartRestApi', 'can_delete')
   ('DashboardRestApi', 'can_get')
   ('ChartRestApi', 'can_related')
   ('ChartRestApi', 'can_info')
   ('DatabaseRestApi', 'can_get')
   ('ChartRestApi', 'can_bulk_delete')
   ('DatasetRestApi', 'can_delete')
   ('ChartRestApi', 'can_post')
   Remove views:
   DatasetRestApi
   LogRestApi
   DatabaseRestApi
   ChartRestApi
   DashboardRestApi
   Remove permissions:
   can_info
   can_related
   can_table_metadata
   can_refresh
   can_export
   can_bulk_delete
   ```
   
   Expected output: I shout see a ChartResetApi permission in modify roles
   Output: No ChartResetApi present in the list.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to