Correct GQL Authorize policies

This commit is contained in:
Jordan Dominion
2024-09-23 21:21:22 -04:00
parent 0b87147385
commit e14d99823c
2 changed files with 2 additions and 0 deletions
@@ -127,6 +127,7 @@ namespace Tgstation.Server.Host.Security
var listRoles = roleNames.ToList();
listRoles.Add(TgsAuthorizeAttribute.UserEnabledRole);
Roles = [.. listRoles];
Apply = ApplyPolicy.Validation;
}
}
}
@@ -35,6 +35,7 @@ namespace Tgstation.Server.Host.Security
?? throw new InvalidOperationException($"Could not find method {authorityType}.{methodName}() has no {nameof(TgsAuthorizeAttribute)}!");
MethodName = methodName;
Roles = authorizeAttribute.Roles?.Split(',', StringSplitOptions.RemoveEmptyEntries);
Apply = ApplyPolicy.Validation;
}
}
}