public async Task <bool> CanCreateAsync(Guid?groupId) { if (IsGroupHidden(groupId)) { return(false); } return(await _permissionsService.CheckAsync(new PermissionSettingIdentity(PermissionActionEnum.Create, PermissionActivityType))); }
public async Task <bool> ValidatePermissionAsync(IPublishedContent content) { return(content.ContentType.Alias != GroupsCreatePage || await _permissionsService.CheckAsync(new PermissionSettingIdentity(PermissionActionEnum.Create, PermissionResourceType))); }
private Task <bool> IsPinAllowedAsync() { return(_permissionsService.CheckAsync(ActivityType, PermissionActionEnum.CanPin)); }