# PermissionController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/Security/PermissionController.cs` (line 19)

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

## Where it refuses work

- `PermissionController` stops the work with an early return when `!success`, in 3 places.
- `PermissionController` stops the work with an early return when `!ModelState.IsValid`, in 2 places.
- `PermissionController` stops the work with an early return when `permissionLogic.Exists(model.Name, model.PermissionID)`, in 2 places.
- `PermissionController` stops the work with an early return when `!item.HasObject`.
- `PermissionController` stops the work with an early return when `!permission.HasObject`.

## When something fails

- `PermissionController` handles failure in 8 places: it turns it into a return value in all 8.

## Relationships

- MODULE_DECLARES → `GetByID`
- MODULE_DECLARES → `GetPermissions`
- MODULE_DECLARES → `Insert`
- MODULE_DECLARES → `Update`
- MODULE_DECLARES → `Delete`
- IMPORTS → `Permission`
- IMPORTS → `BaseController`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `PermissionBindingModel`
- IMPORTS → `PersonUser`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Save`
- IMPORTS → `Update`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`

## 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
