mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/RBAC: Allow custom security levels for commands. (Before this change any command with seclevel > 3 had the same permissions than player commands)
Note: This is still a workaround till command system is moved to RBAC
This commit is contained in:
@@ -137,9 +137,10 @@ bool ChatHandler::isAvailable(ChatCommand const& cmd) const
|
||||
permission = RBAC_PERM_MODERATOR_COMMANDS;
|
||||
break;
|
||||
case SEC_PLAYER:
|
||||
default:
|
||||
permission = RBAC_PERM_PLAYER_COMMANDS;
|
||||
break;
|
||||
default: // Allow custom security levels for commands
|
||||
return m_session->GetSecurity() >= AccountTypes(cmd.SecurityLevel)
|
||||
}
|
||||
|
||||
return m_session->HasPermission(permission);
|
||||
|
||||
Reference in New Issue
Block a user