mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 08:33:19 +01:00
Correct GQL Authorize policies
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user