EntitySecurityAttribute.cs 558 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace InABox.Core
  5. {
  6. /// <summary>
  7. /// Allows for customising the security tokens for entity actions, overriding the <see cref="AutoSecurityDescriptor{TEntity, TAction}"/> for
  8. /// a given <see cref="Entity"/>.
  9. /// </summary>
  10. [AttributeUsage(AttributeTargets.Class)]
  11. public class EntitySecurityAttribute : Attribute
  12. {
  13. public Type? CanView { get; set; }
  14. public Type? CanEdit { get; set; }
  15. public Type? CanDelete { get; set; }
  16. }
  17. }