Permissions refactor and implementation on Book Component Page Manager (and Whole Book )
Implementing Permissions
- as Defined in this sheet here
wrap all components with permission gate, with appropriate scope
-
New version
-
View Preview tab -
Publish -
Review panel: request review -
Review panel: revise -
Review panel: approve -
Review panel: comment
-
Manage team tab -
Add member -
Remove from team
-
Files tab -
Submit -
Reload preview -
Book component: upload Source file version -
Book component: upload Converted file version -
Book component: download file version -
Book component: convert current file version -
Bookshelf Display PDFs: Upload files -
Bookshelf Display PDFs: Delete files -
Suppl: upload files -
Suppl: delete file -
Images: view -
Images: delete -
Images: upload (PDF and XML wf only) -
Images: download -
Support: view -
Support: upload (only PDF WF) -
Support: delete (only PDF Wf) -
Support: download -
Review: view -
Review: download
-
View Metadata tab
-
View Errors tab -
Comment in errors tab
-
View Vendor query tab -
open issue -
close issue -
comment on issue
2. Test all the above UIs for all roles to have the correct access rights
3. Remove redundant code for permissions in the files where work is done
Note:
all elements mentioned above should be wrapped similar to the below example, where parameter scopes
should have the key-word to check if the user that is logged in has permission
<PermissionsGate scopes={['view-or-edit-component-name']}>
<ComponentToBeChecked />
</PermissionsGate>
Testing Permissions
Create users with these roles:
- System Admin
- PDF to XML Vendor
Users in Organization no. 1 (can be any title)
- Organization admin
- Editor in organization not assigned to any book
- Editor in organization and assign to book (ex Book no.1 (Word workflow chapter processed) - created in Organization no. 1)
- Editor in organization and assign to one book component
Users in Organization no. 2 (can be any title)
- Organization admin for this organization
- Editor in organization not assigned to any book
- Editor in organization and assign to book
After created 9 users with above roles , log in as any of them to test if you have correct permissions on the app