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:
Spp
2013-02-05 09:11:56 +01:00
parent 630ad4b0b5
commit f210ab0d47

View File

@@ -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);