Skip to content

auto-assign group permissions to the resource creator groups #13976

@sijandh35

Description

@sijandh35

📝 Introduction

User Story:
As an admin, I want assign the permissions set a set of permissions to the users that belongs to the creator of the resource, by defining the permsissions in the settings file.

Problem Statement:

As an administrator i want that all the users that belong to all the groups of the resource creator, gets a set of permissions (automatically) defined in the settings file.

Ideally will be possible to define the following two settings in the application:

AUTO_ASSIGN_RESOURCE_CREATOR_GROUPS_PERMISSIONS = ast.literal_eval(os.getenv("AUTO_ASSIGN_RESOURCE_CREATOR_GROUPS_PERMISSIONS", "False"))
RESOURCE_CREATOR_GROUPS_PERMISSIONS = os.getenv("RESOURCE_CREATOR_GROUPS_PERMISSIONS", "view") # Compact permission enum, e.g. "view,download"

NOTE: The above configuration MUST be value and choerent with all the resource available


✅ Expected Results (Acceptance Criteria)

  • Settings setup: It will be possible to set the two envs.
  • Consistency and warnings: If the AUTO_ASSIGN_RESOURCE_CREATOR_GROUPS_PERMISSIONS is set but RESOURCE_CREATOR_GROUPS_PERMISSIONS is not, the system will automatically use the "view" as default permission
  • Permission evaluation: the perms defined in RESOURCE_CREATOR_GROUPS_PERMISSIONS must be one of the available compact permissions. This check can be done directly in the settings file. If the permission defined is not part of the compact permission. We should raise a warning in the log and use the default view permission

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions