Skip to main content

Grant Temporary Access

Grant temporary access to resources.

Quick Navigation
Outline

Endpoint

POST /api/v1/roles/temporary-access

Headers

HeaderRequiredDescription
AuthorizationYesBearer <access_token>
Content-TypeYesapplication/json

Request Body

{
"user_id": 123,
"role_id": 2,
"expires_at": "2024-01-08T00:00:00Z",
"justification": "Temporary access for project deadline"
}

Response

Success (201)

{
"success": true,
"data": {
"temporary_access": {
"id": 1,
"user_id": 123,
"role_id": 2,
"expires_at": "2024-01-08T00:00:00Z"
},
"message": "Temporary access granted successfully"
},
"message": "Temporary access granted successfully"
}

Features

  • Time-limited access
  • Automatic expiration
  • Audit logging

Status

[WARNING] TODO: Not Implemented

This endpoint is defined in the router but the implementation logic is not yet complete.