public override void Alter(ActionCall call) { var entityType = _entityType ?? call.HandlerType.GetEntityType(); var role = CrudRules.SecurableNameForCreation(entityType); call.ParentChain().Authorization.AddRole(role); }
private void addCreationPermission(ActionCall action) { // If there are no other permissioning, add one if (!action.HasAttribute <AuthorizationAttribute>()) { var permissionName = CrudRules.SecurableNameForCreation(_entityType); action.ParentChain().Authorization.AddRole(permissionName); } }