You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
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 theclassroom/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:
The text was updated successfully, but these errors were encountered: