Skip to content

Commit

Permalink
bring back admin rights check (SerbiaStrong-220#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
Werzet authored Sep 8, 2024
1 parent e7e024c commit 7a11342
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Content.Server/Administration/Systems/AdminSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,13 @@ private void UpdatePanicBunker()
var admins = PanicBunker.CountDeadminnedAdmins
? _adminManager.AllAdmins
: _adminManager.ActiveAdmins;
var hasAdmins = admins.Any();
// var hasAdmins = admins.Any();

// SS220 additional admin rights check.
var hasAdmins = admins
.Select(x => _adminManager.GetAdminData(_playerManager.GetSessionById(x.UserId)))
.Where(x => x is not null && x.HasFlag(AdminFlags.Ban) && x.Title != Loc.GetString("admin-manager-admin-data-host-title"))
.Any();

// TODO Fix order dependent Cvars
// Please for the sake of my sanity don't make cvars & order dependent.
Expand Down

0 comments on commit 7a11342

Please sign in to comment.