public void OnPostDelete(PostDeleteEvent @event) { var name = @event.Entity.GetType().Name; if (_authorizationObjects.Any(a => a == name)) { OperationAuthorizationService.InvalidateCache(); } }
public void OnPreUpdateCollection(PreCollectionUpdateEvent @event) { var affectedOwnerEntityName = @event.GetAffectedOwnerEntityName(); //var role = @event.Collection.Role; if (_authorizationObjects.Any(a => a == affectedOwnerEntityName) && @event.Collection.IsDirty) { OperationAuthorizationService.InvalidateCache(); } }
public OperationAuthorizationHandler(OperationAuthorizationService operationAuthorizationService) { _operationAuthorizationService = operationAuthorizationService; }