ID Console can no longer grant access the privileged ID doesn't have. (read: AA nerf) (#14699)

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Moony
2023-05-05 08:56:54 -05:00
committed by GitHub
parent 443220551c
commit 5cb1d70a3b
6 changed files with 50 additions and 15 deletions

View File

@@ -116,7 +116,7 @@ namespace Content.Client.Access.UI
// this is a sussy way to do this
foreach (var access in job.Access)
{
if (_accessButtons.TryGetValue(access, out var button))
if (_accessButtons.TryGetValue(access, out var button) && !button.Disabled)
{
button.Pressed = true;
}
@@ -131,7 +131,7 @@ namespace Content.Client.Access.UI
foreach (var access in groupPrototype.Tags)
{
if (_accessButtons.TryGetValue(access, out var button))
if (_accessButtons.TryGetValue(access, out var button) && !button.Disabled)
{
button.Pressed = true;
}
@@ -187,6 +187,7 @@ namespace Content.Client.Access.UI
if (interfaceEnabled)
{
button.Pressed = state.TargetIdAccessList?.Contains(accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains(accessName)) ?? true;
}
}