Kind: Controller
Source: Pams/API/Pams.API/Controllers/BaseController.cs (line 515)
Part of: Pams
Where it refuses work
BaseControllerstops the work withUnauthorizedAccessExceptionwhen!HasAnyRole(roles).BaseControllerstops the work withUnauthorizedAccessExceptionwhen!HasAllRoles(roles).BaseControllerstops the work withUnauthorizedAccessExceptionwhen!HasCompletedTwoFactor— “Two-factor authentication required”.BaseControllerstops the work withUnauthorizedAccessExceptionwhen!ValidateCompanyAccess(companyId)— “Access denied to company resources”.BaseControllerstops the work withUnauthorizedAccessExceptionwhen!ValidateBranchAccess(branchId)— “Access denied to branch resources”.BaseControllerstops the work with an early return whenCurrentCompanyBranch != null, in 7 places.
When something fails
BaseControllerhandles failure in 3 places: it logs it and continues in all 3.
Relationships
- IMPORTS →
DeflateCompressionFilter - IMPORTS →
Person - IMPORTS →
Employee - IMPORTS →
PersonUser - IMPORTS →
CompanyBranch - IMPORTS →
UserPermissionBindingModel - IMPORTS →
GetUserPermissions - IMPORTS →
UserPermissionViewModel - IMPORTS →
DomainException - IMPORTS →
AuthorizationResult
Used by
219 references from 219 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (219)
AccountManagerTargetController—Pams/API/Pams.API/Controllers/BookingTarget/AccountManagerTargetController.cs:11EmployeeBonusController—Pams/API/Pams.API/Controllers/BookingTarget/EmployeeBonusController.cs:11FinanceBudgetController—Pams/API/Pams.API/Controllers/BookingTarget/FinanceBudgetController.cs:11ForecastedBookingController—Pams/API/Pams.API/Controllers/BookingTarget/ForecastedBookingController.cs:11PrincipalTargetController—Pams/API/Pams.API/Controllers/BookingTarget/PrincipalTargetController.cs:11ProductTypeTargetController—Pams/API/Pams.API/Controllers/BookingTarget/ProductTypeTargetController.cs:11TeamTargetController—Pams/API/Pams.API/Controllers/BookingTarget/TeamTargetController.cs:11UserMarkerController—Pams/API/Pams.API/Controllers/ColorMarker/UserMarkerController.cs:10
…and 211 more.
Was this page helpful?