public PermissionValueCheckContext( [NotNull] PermissionDefinition permission, [CanBeNull] ClaimsPrincipal principal) { Check.NotNull(permission, nameof(permission)); Permission = permission; Principal = principal; }
protected virtual void AddPermissionToDictionaryRecursively( Dictionary <string, PermissionDefinition> permissions, PermissionDefinition permission) { if (permissions.ContainsKey(permission.Name)) { throw new RocketException("Duplicate permission name: " + permission.Name); } permissions[permission.Name] = permission; foreach (var child in permission.Children) { AddPermissionToDictionaryRecursively(permissions, child); } }