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
Create an endpoint for admin to create roles for users within an organisation from the system. This endpoint will allow only admins to create roles within their organisation efficiently and securely.
Acceptance Criteria
The endpoint should follow RESTful API standards.
The operation should return the correct HTTP status code
Success: 200 OK
The response body should match the provided example.
The API should be secure, ensuring only admin users can create user roles within an organisation.
Create roles for users in an organisation
Endpoint: PUT /api/v1/organisations/{org_id}/users/{user_id}/role
Path parameters on the API
org_id => String.
user_id => String.
Purpose
The purpose of this endpoint is to allow admins to assign roles to users within an organisation. This will help the admin limit access control to organisation resources.
Requirements
The request user must be authenticated with jwt token to assign roles in an organisation
The request user must have admin role to access the endpoint
Expected Outcome
Successful implementation of the assign roles to users in organizations endpoint.
An intuitive and secure way for admins to assign different roles to the users.
Increased efficiency in assigning user roles and managing user roles.
Improved admin experience by providing role assignment to users in an organisation.
Unit Testing
Ensure the endpoint correctly identifies if the requesting user is signed in
Ensure the endpoint correctly identifies if the requesting user is an admin
Test the endpoint to correctly update a users role in an organisation.
The text was updated successfully, but these errors were encountered:
STARKthegreat
changed the title
FEAT: Create a new team member
FEAT: CREATE ROLES WITHIN AN ORGANISATION
Feb 28, 2025
STARKthegreat
changed the title
FEAT: CREATE ROLES WITHIN AN ORGANISATION
FEAT: ASSIGN ROLES TO USERS WITHIN AN ORGANISATION
Feb 28, 2025
Description
Create an endpoint for admin to create roles for users within an organisation from the system. This endpoint will allow only admins to create roles within their organisation efficiently and securely.
Acceptance Criteria
Endpoint: PUT /api/v1/organisations/{org_id}/users/{user_id}/role
Path parameters on the API
org_id => String.
user_id => String.
Request Body
Successful Response
Status code: 200
Error Response
Status code: 401
Unauthenticated.
Status code: 403
User not a member of the organisation
Status code: 400
User already added to organization.
Purpose
The purpose of this endpoint is to allow admins to assign roles to users within an organisation. This will help the admin limit access control to organisation resources.
Requirements
Expected Outcome
Unit Testing
The text was updated successfully, but these errors were encountered: