Set up ERM permissions model
Description
is cloned by
is defined by
Checklist
hideTestRail: Results
Activity
steve.osguthorpe May 20, 2019 at 11:41 AM
I think we should avoid creating a new module, as that seems like unnecessary resourcing just to bootstrap some data. Instead I propose we just implement the necessary system level interface(s) probably something like 'tenantPermissions' and do the right thing within each app. Think this should probably be added to the shared okapi module so that we can just add config to our app(s) and they will do the right thing on startup.
We perhaps need a data bootstrapping task in general with this as a sub-task.
Kurt Nordstrom April 10, 2019 at 9:09 PM
So in chatting with Wayne, it sounds like the most correct way to do this would be to create a module that we'd add to Okapi that would, as part of it's tenant initialization, create permission sets (to group the permissions), and then to create the required users, permission users, credentials, service points users, etc, and assign the appropriate permission sets to them.
This is preferable to simply provisioning the information via Ansible, because the current trend is to move away from that and have all of the data provisioning handled by the modules themselves.
An example in an RMB module (though we wouldn't have to use RMB) is here: https://github.com/folio-org/mod-inventory-storage/blob/0a24f1bf854c4e2624bb14d9f912c23034e3eb35/src/main/java/org/folio/rest/impl/TenantRefAPI.java#L77
Kurt Nordstrom April 8, 2019 at 1:47 PM
From discussions on Sprint 61 planning call, this appears to be a matter of having the permission sets created on the test system by default, and by assigning these permissions to specific users in the system.
Plan to reach out to Wayne to discuss this configuration.
Jag Goraya March 20, 2019 at 5:53 PM
I've updated the description a link to the spreadsheet of permissions based on ERM stories.
There are probably more to define from pre-ERM (jira project) days. Please correct the description if the default user privilege is not that all data on ERM can be viewed by a logged-in user.
Distinguishing 3 types of role:
User (eg, Librarian) (View permissions for license/agreement)
Manager (eg, eResource Manager) (Create, Edit and View permissions for license/agreement)
Administrator (system administrator) (Create, Edit and View permissions, plus system capabilities)
Admin has all Manager and User privileges, and Manager has all User privileges.
Assumed:
if you can access ERM, you can view the content that is in there (ie, all data for resources, agreements and licenses is viewable to all users). There are some recent stories that explicitly suppress content in certain situations (though that would apply to all users, so is not role-based so much as context-based; eg, ERM-108).
The current known permissions / capabilities are defined in https://docs.google.com/spreadsheets/d/1-uyPRkdfByaXUb9ceOPu3lotIwItJdCk8EyhYrEv4Qs/edit?usp=sharing.