Skip to content

Commit 62fe2d6

Browse files
authored
Core/Chat: Corrected names and descriptions for GM.LowerSecurity config option and related rbac permission (#30644)
1 parent 6f30db7 commit 62fe2d6

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

sql/base/auth_database.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ INSERT INTO `rbac_permissions` VALUES
16721672
(44,'Receive global GM messages/texts'),
16731673
(45,'Join channels without announce'),
16741674
(46,'Change channel settings without being channel moderator'),
1675-
(47,'Enables lower security than target check'),
1675+
(47,'Can ignore non-strong lower security checks if it\'s disabled in config'),
16761676
(48,'Enable IP, Last Login and EMail output in pinfo'),
16771677
(49,'Forces to enter the email for confirmation on password change'),
16781678
(50,'Allow user to check his own email with .account'),
@@ -2531,7 +2531,8 @@ INSERT INTO `updates` VALUES
25312531
('2024_08_28_01_auth.sql','BC5D74553AF2D92606F55C1C462D2700FE73BD34','ARCHIVED','2024-08-28 14:55:05',0),
25322532
('2024_08_30_00_auth.sql','BD76942F1C29AAA2450E051E7CA552672B5E331B','ARCHIVED','2024-08-30 19:24:30',0),
25332533
('2024_09_26_00_auth.sql','E37C3997FD7851EA360774AC568912846C448272','ARCHIVED','2024-09-26 18:27:26',0),
2534-
('2024_11_22_00_auth.sql','F2C1D1572A3968E9E9D778EF7DC82778DF3EF887','ARCHIVED','2024-11-22 23:18:14',0);
2534+
('2024_11_22_00_auth.sql','F2C1D1572A3968E9E9D778EF7DC82778DF3EF887','ARCHIVED','2024-11-22 23:18:14',0),
2535+
('2025_02_14_00_auth.sql','4A30E92FF519BB41C520CDBF90019291217C26A2','RELEASED','2025-02-14 17:20:00',0);
25352536
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
25362537
UNLOCK TABLES;
25372538

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--
2+
UPDATE `rbac_permissions` SET `name`='Can ignore non-strong lower security checks if it\'s disabled in config' WHERE `id`=47;

src/server/game/Accounts/RBAC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ enum RBACPermissions
9797
RBAC_PERM_RECEIVE_GLOBAL_GM_TEXTMESSAGE = 44,
9898
RBAC_PERM_SILENTLY_JOIN_CHANNEL = 45,
9999
RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR = 46,
100-
RBAC_PERM_CHECK_FOR_LOWER_SECURITY = 47,
100+
RBAC_PERM_CAN_IGNORE_LOWER_SECURITY_CHECK = 47,
101101
RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA = 48,
102102
RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE = 49,
103103
RBAC_PERM_MAY_CHECK_OWN_EMAIL = 50,

src/server/game/Chat/Chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
7777
return false;
7878

7979
// ignore only for non-players for non strong checks (when allow apply command at least to same sec level)
80-
if (m_session->HasPermission(rbac::RBAC_PERM_CHECK_FOR_LOWER_SECURITY) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY))
80+
if (m_session->HasPermission(rbac::RBAC_PERM_CAN_IGNORE_LOWER_SECURITY_CHECK) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY))
8181
return false;
8282

8383
if (target)

src/server/worldserver/worldserver.conf.dist

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,8 +2178,12 @@ GM.AllowInvite = 0
21782178

21792179
#
21802180
# GM.LowerSecurity
2181-
# Description: Allow lower security levels to use commands on higher security level
2182-
# characters.
2181+
# Description: Disallow lower security levels to use commands on higher security level
2182+
# characters. Regardless of this value, lower security check is always
2183+
# enabled for accounts without RBAC_PERM_CAN_IGNORE_LOWER_SECURITY_CHECK.
2184+
# This option also does not affect "strong" checks, such as in
2185+
# certain .account and .rbac commands, which are always enabled.
2186+
#
21832187
# Default: 0 - (Disabled)
21842188
# 1 - (Enabled)
21852189

0 commit comments

Comments
 (0)