Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Permission Logic and Check Function in Classroom Groups Folder #11

Open
2 tasks
MutyaSowmya123 opened this issue Sep 24, 2024 · 0 comments · May be fixed by #12
Open
2 tasks

Implement Permission Logic and Check Function in Classroom Groups Folder #11

MutyaSowmya123 opened this issue Sep 24, 2024 · 0 comments · May be fixed by #12
Assignees
Labels
Structuring Project setup arrangement

Comments

@MutyaSowmya123
Copy link
Collaborator

MutyaSowmya123 commented Sep 24, 2024

Description: This task focuses on implementing the permission-checking logic within the classroom group interface. It builds on the role definitions and permission parameters to allow permission validation based on role, action, scope, and entity.

Requirements:

Create a file permissions.mjs inside the classroom/groups folder.
Implement a checkPermissions function that will validate whether a specific role can perform an action on a particular entity and scope.
Example logic:
OWNER should have permission for all actions.
CONTRIBUTOR should have limited permissions, such as READ and UPDATE on certain scopes.

Test Cases:
Write test cases to ensure the checkPermissions function behaves as expected.
Example tests:
Ensure that OWNER can perform an UPDATE on any entity.
Validate that a CONTRIBUTOR can only perform certain actions on specific entities (e.g., UPDATE_TEXT on a PAGE).

Acceptance Criteria:

  • The permissions.mjs file is created and implements a fully functional checkPermissions function.

  • Test cases cover multiple roles and permission scenarios, ensuring correct behavior.

Attachment for reference:
roles_permissions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Structuring Project setup arrangement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants