feat(Core/RBAC): Role Based Access Controls (#24641)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Spp <spp@jorge.gr>
Co-authored-by: Spp <spp@tc.plus>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-05-01 07:19:30 -05:00
committed by GitHub
parent a783e6c436
commit 779331fc4b
97 changed files with 6276 additions and 1089 deletions
+14 -3
View File
@@ -34,6 +34,7 @@
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "Player.h"
#include "RBAC.h"
#include "ScriptMgr.h"
#include "SharedDefines.h"
#include "SocialMgr.h"
@@ -493,7 +494,9 @@ namespace lfg
uint32 lockData = 0;
if (dungeon->expansion > expansion || (onlySeasonalBosses && !dungeon->seasonal))
if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_JOIN_DUNGEON_FINDER))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
else if (dungeon->expansion > expansion || (onlySeasonalBosses && !dungeon->seasonal))
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
else if (IsDungeonDisabled(dungeon->map, dungeon->difficulty))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
@@ -698,7 +701,11 @@ namespace lfg
if (!isRaid && joinData.result == LFG_JOIN_OK)
{
// Check player or group member restrictions
if (player->InBattleground() || (player->InBattlegroundQueue() && !sWorld->getBoolConfig(CONFIG_ALLOW_JOIN_BG_AND_LFG)))
if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_JOIN_DUNGEON_FINDER))
{
joinData.result = LFG_JOIN_NOT_MEET_REQS;
}
else if (player->InBattleground() || (player->InBattlegroundQueue() && !sWorld->getBoolConfig(CONFIG_ALLOW_JOIN_BG_AND_LFG)))
{
joinData.result = LFG_JOIN_USING_BG_SYSTEM;
}
@@ -721,7 +728,11 @@ namespace lfg
{
if (Player* plrg = itr->GetSource())
{
if (plrg->HasAura(LFG_SPELL_DUNGEON_DESERTER))
if (!plrg->GetSession()->HasPermission(rbac::RBAC_PERM_JOIN_DUNGEON_FINDER))
{
joinData.result = LFG_JOIN_PARTY_NOT_MEET_REQS;
}
else if (plrg->HasAura(LFG_SPELL_DUNGEON_DESERTER))
{
joinData.result = LFG_JOIN_PARTY_DESERTER;
}