đ§ RoleController Documentation
QUICK DOCUMENTATIONâ
- File Path:
/API/Controllers/RoleController.cs - Primary Purpose: Manages user roles and role assignments in the APV system
- Key Endpoints:
- đ
GET /api/Role/List: Retrieves all application roles
- đ
- Related Models:
ApplicationRoleDto: Represents a user role with its permissions
- Used By:
- Admin section for user management
- Client and user administration functionality
đ Business Contextâ
The RoleController is part of the security infrastructure in APV, supporting the administrative functions needed to manage user permissions. This aligns with the client management functionality described in the Technical Audit, enabling proper access control for different types of users.
DETAILED DOCUMENTATIONâ
đ Overviewâ
RoleController provides endpoints for administrators to view and manage roles in the Asset Valuer Pro system. Roles define the permissions users have within the system, controlling access to features and data.
đī¸ Controller Dependenciesâ
- Namespace:
AVP.API.Controllers - Services Used:
Mediator: For handling commands and queries
- Other Dependencies:
- đ
Authorizeattribute restricting access to Administrator role only
- đ
đ Endpointsâ
đ Get All Rolesâ
- HTTP Method: GET
- URL Pattern:
/api/Role/List - Authentication: đ Required, Administrator role only
- Description: Retrieves a list of all application roles
Request Parametersâ
None
Response Formatâ
[
{
"id": "string",
"name": "string",
"normalizedName": "string",
"description": "string",
"permissions": ["string"]
}
]
đĄ Implementation Notesâ
- âšī¸ The controller contains commented-out code for additional endpoints that appear to be under development:
- GetRole: For retrieving a specific role
- UpdateRole: For updating role details
- đ Only administrators can access role management functionality
- â Role permissions control access to specific features throughout the application