View Categories

Module Description for Module ‘Admin Rights’ v1

Version #

Version 1

Module Type #

Standard

Internal Name #

adminRights

Status #

Draft

Description #

The Admin Rights Module manages the permissions assigned to admin roles. In Version 1, all admins receive full rights by default. This only Right can be hardcoded; no endpoints will exist for CRUD operations. The Module have basic error handling.

User Journeys #

getAdminRight #

Name

getAdminRight

Overview

This user journey describes how an authenticated admin retrieves their assigned admin rights (permissions) from the system. By making a request to the /adminRights/get endpoint, the admin can view any rights configuration currently applicable to their role.

Actors

  • Admin User (initiator)
  • Admin Rights Module (system)
  • Auth Module (handles Authentication)

Preconditions

  • The admin must be authenticated via the Auth Module (valid JWT Token).
  • The Admin Rights Module must be operational and accessible.

Flow

Primary Flow

  1. The Admin User sends a POST request to /adminRights/get, including their valid JWT.
  2. The Admin Rights Module validates the request and looks up the admin”s role-based permissions.
  3. The module returns a success response, such as: {  “RoleID”: “role-admin-001”,  “Permissions”: {    “all”: “full-access”  }}
  4. A webhook (adminRightsRetrieved) is triggered to log or handle the successful retrieval of rights.

Alternative/Exception Flows

  • If an error occurs (e.g., invalid Token, missing role data), the system returns: { “status”: “Error” } and triggers the adminRightsError webhook with details about the error.

Outcome

  • The admin”s role-based permissions are successfully retrieved, allowing the admin to know what actions they can perform within the system.

Error Handling

  • On error, the module responds with { “status”: “Error” }.
  • The adminRightsError webhook is fired, including error context (timestamp, endpoint, etc.).

Postconditions

  • On success, the admin now has an accurate view of their rights configuration.
  • On error, no rights data is returned, and the error is logged for further investigation.

Triggers

  • adminRightsRetrieved: Fired when the admin”s rights are successfully returned.
  • adminRightsError: Fired when an error occurs while retrieving rights.

Notes

  • In Version 1, all admins have full access rights by default.
  • No endpoints exist to create or modify admin rights in Version 1; everything is hardcoded.

Authentication #

Authentication for is managed via the Auth Module. Module-to-module communication in Version 1 does not require Authentication. Internal services can call the Admins Module freely.

Schema #

AdminRights #

NameTypeInternal NameDescription
admin_right_idUUID/StringadminRights.AdminRights.admin_right_idUnique identifier for the rights configuration
admin_role_idStringadminRights.AdminRights.admin_role_idAssociated admin role (Standard)
admin_right_permissionsJSONadminRights.AdminRights.admin_right_permissionsFull access rights in Version 1

Functions #

NameEndpointDescriptionInternal NameInputResponse
getAdminRight/adminRights/getRetrieves rights for the admin roleadminRights.getAdminRight{ “admin_role_id”: “role-admin-001” }{ “admin_role_id”: “role-admin-001”, “admin_right_permissions”: { “all”: “full-access” } }or{ “status”: “Error” }

Webhooks #

NameTriggerDestinationPayloadDescriptionError Handling
adminRightsRetrievedWhen an admin retrieves their assigned rights.Log Modulejson { “event”: “admin.rights_retrieved”, “timestamp”: “2025-03-13T12:00:00Z”, “admin”: { “AdminID”: “admin-001”, “Permissions”: { “read”: true, “write”: true, “delete”: true } } }Sends a webhook to the Log Module when an admin fetches their assigned rights.None
adminRightsErrorTriggered when an error occurs during any Admin Rights module operation (e.g., while retrieving rights).Log Module{  “event”: “adminRightsError”,  “timestamp”: “2025-03-13T12:00:00Z”,  “error”: “Error message details”,  “endpoint”: “/adminRights/get”}Sends a webhook to the Log Module containing details of the error, including the endpoint where it occurred, a timestamp, and an error message.None

Settings #

Not applicable

Clarifications #

  • The Standard admin role is assumed to have full permissions (read, write, create, delete) on every resource in the system. In version 1 all admins have the Admin Role Standard, so all Admins have all rights.
  • This configuration is fixed in Version 1 for simplicity.
  • Future versions may introduce more granular rights or multiple admin roles with differing permissions.