예제 #1
0
 public PermissionValueCheckContext(PermissionDefinition permission, ClaimsPrincipal principal)
 {
     Permission = permission;
     Principal  = principal;
 }
예제 #2
0
        protected virtual void AddPermissionToDictionaryRecursively(Dictionary <string, PermissionDefinition> permissions, PermissionDefinition permission)
        {
            if (permissions.ContainsKey(permission.Name))
            {
                throw new LinFxException("Duplicate permission name: " + permission.Name);
            }

            permissions[permission.Name] = permission;

            foreach (var child in permission.Children)
            {
                AddPermissionToDictionaryRecursively(permissions, child);
            }
        }