pressbooks / pressbooks-multi-institution

Tools for managing Pressbooks networks shared by multiple institutions
GNU General Public License v3.0
0 stars 1 forks source link

Create institutional manager role #10

Closed SteelWagstaff closed 7 months ago

SteelWagstaff commented 8 months ago

Currently, the network manager is a 'restricted' super admin. We want to create a sub-class of network manager -- an 'institutional manager' who resembles a network manager, but only for books/users associated with a given institution. The primary way that an institutional manager differs from a network manager in our database is that an institutional manager is associated with one (and only one) institution.

We need to find a consistent way of specifying which institution an institutional manager is associated with. We also need to determine a consistent way of checking institutional values for the institutional manager and the book/user the institutional manager wants to take action on when performing admin actions (edit/activate/deactivate/delete book or edit/delete user).

See https://github.com/pressbooks/pressbooks-multi-institution/issues/2 for details of requirements.

arzola commented 8 months ago

I've been working on menus handler to hide specific options when this kind of users are logged in

Current TODO

SteelWagstaff commented 8 months ago

@arzola I'm a little concerned about the direction this task is taking this sprint. From my point of view, the goal is to create a functional new role and to ensure that users are assigned and unassigned from this role whenever they are assigned as institutional managers by the create/manage institution form. The action should make them a super admin and apply some restriction that indicates that they are an 'institutional manager' rather than an unrestricted super admin or a (restricted) network manager. This user needs to be restricted to only being able to edit and delete books/users when they're assigned to their institution.

Figuring out how to display various pages (custom dashboard, book/user lists, institutional stats page) to this role can come in a later sprint, IMO.

arzola commented 8 months ago

As we discussed yesterday I have the following

I uploaded a POC in https://oscardev.pressbooks.network

TODO:

Probably for next iteration

arzola commented 8 months ago

Approach to follow next iteration.

  1. Block all pages by default and having an allowlist for pages the institution manager could see
  2. Map and append filters in every action on network analytics plugin to handle permissions (Edit users, edit books, delete actions, etc): #45
  3. Create new dashboard page: https://github.com/pressbooks/pressbooks-multi-institution/issues/39
  4. Set of tests
  5. Discuss if data collector tables should hold the institution ID on the book record (and maybe users too) #43
SteelWagstaff commented 8 months ago

@arzola see https://github.com/pressbooks/pressbooks-multi-institution/issues/45 for initial description of capabilities institutional managers need to have. How does this look to you?

SteelWagstaff commented 7 months ago

Closing in favour of #45