# RoleController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/Security/RoleController.cs` (line 23)

**Part of:** [Pams](subsystem-pams)

## Where it refuses work

- `RoleController` stops the work with an early return when `isDublicate`, in 2 places.
- `RoleController` stops the work with an early return when `model != null`.
- `RoleController` stops the work with an early return when `!RLogic.IsAllowedToAddRoleAsPerSubscription(CompanyID)`.
- `RoleController` stops the work with an early return when `NewRole == null`.
- `RoleController` stops the work with an early return when `!success`.
- `RoleController` stops the work with an early return when `!Rol.HasObject`.

## When something fails

- `RoleController` handles failure in 7 places: it turns it into a return value in all 7.

## Relationships

- MODULE_DECLARES → `GetAll`
- MODULE_DECLARES → `GetSecurityAccessTypes`
- MODULE_DECLARES → `GetPages`
- MODULE_DECLARES → `GetByID`
- MODULE_DECLARES → `GetByBranchid`
- MODULE_DECLARES → `GetLookup`
- MODULE_DECLARES → `Insert`
- MODULE_DECLARES → `Update`
- MODULE_DECLARES → `Delete`
- MODULE_DECLARES → `CopyToBranch`
- MODULE_DECLARES → `DouplicateRole`
- IMPORTS → `Role`
- IMPORTS → `BaseController`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `RoleBindingModel`
- IMPORTS → `Person`
- IMPORTS → `SecurityAccessType`
- IMPORTS → `SecurityAccessTypeBindingModel`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `RolePermission`
- IMPORTS → `RolePermissionBindingModel`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Update`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `PersonUser`

## Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### calls by (3)

- `AppSettings` — `Frontend/src/app/settings/app/app.settings.ts`:241
- `AppSettings` — `Pams/Web/Pams.Web/Client/app/settings/app/app.settings.ts`:126
- `AppSettings` — `Pams/Web/Pams.WebApp/Client/app/settings/app/app.settings.ts`:6
