adds toggles for accessreaders (#5696)
This commit is contained in:
@@ -25,6 +25,13 @@ namespace Content.Server.Access.Components
|
|||||||
{
|
{
|
||||||
public override string Name => "AccessReader";
|
public override string Name => "AccessReader";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this reader is enabled or not. If disabled, all access
|
||||||
|
/// checks will pass.
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public bool Enabled = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The set of tags that will automatically deny an allowed check, if any of them are present.
|
/// The set of tags that will automatically deny an allowed check, if any of them are present.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Content.Server.Access.Systems
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return reader.AccessLists.Count == 0 || reader.AccessLists.Any(a => a.IsSubsetOf(accessTags));
|
return !reader.Enabled || reader.AccessLists.Count == 0 || reader.AccessLists.Any(a => a.IsSubsetOf(accessTags));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICollection<string> FindAccessTags(EntityUid uid)
|
public ICollection<string> FindAccessTags(EntityUid uid)
|
||||||
|
|||||||
Reference in New Issue
Block a user