namespace Content.Shared.Administration.Managers; /// /// Manages server administrators and their permission flags. /// public interface ISharedAdminManager { /// /// Gets the admin data for a player, if they are an admin. /// /// /// When used by the client, this only returns accurate results for the player's own entity. /// /// /// Whether to return admin data for admins that are current de-adminned. /// /// if the player is not an admin. AdminData? GetAdminData(EntityUid uid, bool includeDeAdmin = false); /// /// See if a player has an admin flag. /// /// /// When used by the client, this only returns accurate results for the player's own entity. /// /// True if the player is and admin and has the specified flags. bool HasAdminFlag(EntityUid player, AdminFlags flag) { var data = GetAdminData(player); return data != null && data.HasFlag(flag); } /// /// Checks if a player is an admin. /// /// /// When used by the client, this only returns accurate results for the player's own entity. /// /// /// Whether to return admin data for admins that are current de-adminned. /// /// true if the player is an admin, false otherwise. bool IsAdmin(EntityUid uid, bool includeDeAdmin = false) { return GetAdminData(uid, includeDeAdmin) != null; } }