using Abp.Authorization;
using Echonos.Authorization;
[AbpAuthorize(AppPermissions.Pages_ControlNumbers)]
public class ControlNumbersAppService : EchonosAppServiceBase, IControlNumbersAppService {
public void CreateUser(CreateOrUpdateUserInput input)
{
if (!PermissionChecker.IsGranted("Administration.UserManagement.CreateUser"))
{
throw new AbpAuthorizationException("You are not authorized to create user!");
}
//A user can not reach this point if he is not granted for "Administration.UserManagement.CreateUser" permission.
PermissionChecker.Authorize("Administration.UserManagement.CreateUser");
//A user can not reach this point if he is not granted for "Administration.UserManagement.CreateUser" permission.
}
}
const isPartner = abp.auth.isGranted("Pages.Partner");
<div class="col-md-3" [hidden]="!isGrantedAny('Pages.Partner')">
<a href="javascript:;" *ngIf="permission.isGranted('Pages.ControlNumbers.Delete')"
(click)="deleteControlNumber(record.controlNumber)">{{l('Delete')}}</a>
Discriminator | IsGranted | Name | TenantId | RoleId | UserId |
---|---|---|---|---|---|
RolePermissionSetting | 1 | Pages.Partner | 4 | 17 | |
RolePermissionSetting | 1 | Pages | 4 | 17 | |
RolePermissionSetting | 0 | Pages.Partner | 4 | 16 | |
RolePermissionSetting | 0 | Pages.Provider | 4 | 16 |