Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 914 Bytes

permissions.md

File metadata and controls

25 lines (18 loc) · 914 Bytes

Using Predefined Permissions

The Get(), GetAll(), Create(), Update() and Delete() functions in the CrudAppServiceBase check if the user is authorized before executing otherwise throws an exception.

Each function uses a predefined PermissionName which, by default, is set to an empty string which is ignored and authorization allowed.

The predefined names are:

  • GetPermissionName
  • GetAllPermissionName
  • CreatePermissionName
  • UpdatePermissionName
  • DeletePermissionName

To use these set the appropriate PermissionName to the permission you defined in .Core/Authroization/PermissionNames.cs

Overriding CRUD Functions

Don't forget to include the function to check authorization as the first line of code in your overriding function.

They are:

  • CheckGetPermission()
  • CheckGetAllPermission()
  • CheckCreatePermission()
  • CheckUpdatePermission()
  • CheckDeletePermission()