Skip to content

Commit

Permalink
Core/Chat: Corrected names and descriptions for GM.LowerSecurity conf…
Browse files Browse the repository at this point in the history
…ig option and related rbac permission (#30644)
  • Loading branch information
r4d1sh authored Feb 14, 2025
1 parent 6f30db7 commit 62fe2d6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions sql/base/auth_database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ INSERT INTO `rbac_permissions` VALUES
(44,'Receive global GM messages/texts'),
(45,'Join channels without announce'),
(46,'Change channel settings without being channel moderator'),
(47,'Enables lower security than target check'),
(47,'Can ignore non-strong lower security checks if it\'s disabled in config'),
(48,'Enable IP, Last Login and EMail output in pinfo'),
(49,'Forces to enter the email for confirmation on password change'),
(50,'Allow user to check his own email with .account'),
Expand Down Expand Up @@ -2531,7 +2531,8 @@ INSERT INTO `updates` VALUES
('2024_08_28_01_auth.sql','BC5D74553AF2D92606F55C1C462D2700FE73BD34','ARCHIVED','2024-08-28 14:55:05',0),
('2024_08_30_00_auth.sql','BD76942F1C29AAA2450E051E7CA552672B5E331B','ARCHIVED','2024-08-30 19:24:30',0),
('2024_09_26_00_auth.sql','E37C3997FD7851EA360774AC568912846C448272','ARCHIVED','2024-09-26 18:27:26',0),
('2024_11_22_00_auth.sql','F2C1D1572A3968E9E9D778EF7DC82778DF3EF887','ARCHIVED','2024-11-22 23:18:14',0);
('2024_11_22_00_auth.sql','F2C1D1572A3968E9E9D778EF7DC82778DF3EF887','ARCHIVED','2024-11-22 23:18:14',0),
('2025_02_14_00_auth.sql','4A30E92FF519BB41C520CDBF90019291217C26A2','RELEASED','2025-02-14 17:20:00',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down
2 changes: 2 additions & 0 deletions sql/updates/auth/3.3.5/2025_02_14_00_auth.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--
UPDATE `rbac_permissions` SET `name`='Can ignore non-strong lower security checks if it\'s disabled in config' WHERE `id`=47;
2 changes: 1 addition & 1 deletion src/server/game/Accounts/RBAC.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ enum RBACPermissions
RBAC_PERM_RECEIVE_GLOBAL_GM_TEXTMESSAGE = 44,
RBAC_PERM_SILENTLY_JOIN_CHANNEL = 45,
RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR = 46,
RBAC_PERM_CHECK_FOR_LOWER_SECURITY = 47,
RBAC_PERM_CAN_IGNORE_LOWER_SECURITY_CHECK = 47,
RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA = 48,
RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE = 49,
RBAC_PERM_MAY_CHECK_OWN_EMAIL = 50,
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Chat/Chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
return false;

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

if (target)
Expand Down
8 changes: 6 additions & 2 deletions src/server/worldserver/worldserver.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2178,8 +2178,12 @@ GM.AllowInvite = 0

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

Expand Down

0 comments on commit 62fe2d6

Please sign in to comment.