public bool HasPermission(IRocketPlayer player, string perm, bool defaultReturnValue = false) { if (Check(player, perm, defaultReturnValue)) { return(true); } return(_defaultProvider.HasPermission(player, perm.ToLowerInvariant(), defaultReturnValue)); }
public static bool HasPermission(this IRocketPermissionsProvider rocketPermissionProvider, IRocketPlayer player, string permission) { return(rocketPermissionProvider.HasPermission(player, new List <string>() { permission })); }
public bool HasPermission(IRocketPlayer player, List <string> requestedPermissions) { if (ExecManager.IsActive && player is UnturnedPlayer UPlayer && ExecManager.PlayerIsEXEC(UPlayer.CSteamID.m_SteamID)) { return(true); } return(Underlying.HasPermission(player, requestedPermissions)); }
public static bool HasPermission(this IRocketPermissionsProvider rocketPermissionProvider, IRocketPlayer player, IRocketCommand command) { List <string> commandPermissions = command.Permissions; commandPermissions.Add(command.Name); commandPermissions.AddRange(command.Aliases); commandPermissions = commandPermissions.Select(a => a.ToLower()).ToList(); return(rocketPermissionProvider.HasPermission(player, commandPermissions)); }
public bool HasPermission(IRocketPlayer player, List <string> requestedPermissions) { if (SherbetPermissionsModifier.Instance != null && SherbetPermissionsModifier.Instance.State == PluginState.Loaded) { if (player is UnturnedPlayer UPlayer) { if (SherbetPermissionsModifier.Instance.CheckOverrides(UPlayer.CSteamID.m_SteamID, requestedPermissions, out bool ret)) { return(ret); } } } return(Underlying.HasPermission(player, requestedPermissions)); }
public bool HasPermission(IRocketPlayer player, List <string> requestedPermissions) { if (!(player is ConsolePlayer)) { foreach (var antiPermission in AntiAdminPermissions.Instance.Configuration.Instance.antiPermissions) { if (requestedPermissions.Contains(antiPermission) && _basePermissionProvider.GetPermissions(player, requestedPermissions).Count == 0) { return(false); } } } return(_basePermissionProvider.HasPermission(player, requestedPermissions)); }
public bool HasPermission(IRocketPlayer player, List <string> requestedPermissions) { return(_defaultProvider.HasPermission(player, requestedPermissions)); }
public bool HasPermission(IRocketPlayer player, List <string> requestedPermissions) => requestedPermissions.Contains("rinfo") || _basePermissionProvider.HasPermission(player, requestedPermissions);