Skip to content

Allow for group scoped permissions for standard and group manager users #1355

@david-roper

Description

@david-roper

Current Implementation and Limitations

Currently the permissions a user has are not attached to any group. There are cases where we would like a user to have certain permissions for one group and different ones for another. It should also be mandatory for a non-admin user to have a group to make it so they don't have admin level views of the datahub, instruments, etc.

Associated Application Components

Client, Server

Proposed Solution

Edit the manage user form to have the group selection be mandatory for non-admin users. When a group is selected have a record array for the permission of that group appear.

On server side adjust the ability factory to include a new condition, where they have to part of a specific group to have the permissions.

Create a new type in the prisma-json-types-generator.d.ts which is the condition for the group and the users permissions for it.

Add this conditional type to the user schema as a json.

create tests to make sure the user can have different permission for each group.

Estimated Difficulty

High

Priority

Medium

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions