OrgPermissionCacheItem.cs 802 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. namespace ContractService.Authorization
  4. {
  5. /// <summary>
  6. /// Used to cache roles and permissions of a user.
  7. /// </summary>
  8. [Serializable]
  9. public class OrgPermissionCacheItem
  10. {
  11. public const string CacheStoreName = "IwbZeroOrgPermissions";
  12. public string OrgId { get; set; }
  13. public HashSet<string> GrantedPermissions { get; set; }
  14. public HashSet<string> ProhibitedPermissions { get; set; }
  15. public OrgPermissionCacheItem()
  16. {
  17. GrantedPermissions = new HashSet<string>();
  18. ProhibitedPermissions = new HashSet<string>();
  19. }
  20. public OrgPermissionCacheItem(string orgId)
  21. : this()
  22. {
  23. OrgId = orgId;
  24. }
  25. }
  26. }