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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,20 @@
-- RBAC Language strings (uses {} format placeholders for Acore::StringFormat)
DELETE FROM `acore_string` WHERE `entry` BETWEEN 63 AND 79;
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
(63, 'Wrong parameter id: {}, does not exist'),
(64, 'Wrong parameter realmId: {}'),
(65, 'Account {} ({}) granted permissions:'),
(66, 'Account {} ({}) denied permissions:'),
(67, 'Account {} ({}) inherited permissions by sec level {} ({}):'),
(68, 'Permissions:'),
(69, 'Linked permissions:'),
(70, 'Empty List'),
(71, '- {} ({})'),
(72, 'Could not grant permission {} ({}) realmId {}. Account {} ({}) already has that permission'),
(73, 'Could not grant permission {} ({}) realmId {}. Account {} ({}) has that permission in deny list'),
(74, 'Granted permission {} ({}) realmId {} to account {} ({})'),
(75, 'Could not deny permission {} ({}) realmId {}. Account {} ({}) already has that permission'),
(76, 'Could not deny permission {} ({}) realmId {}. Account {} ({}) has that permission in grant list'),
(77, 'Denied permission {} ({}) realmId {} to account {} ({})'),
(78, 'Revoked permission {} ({}) realmId {} to account {} ({})'),
(79, 'Could not revoke permission {} ({}) realmId {}. Account {} ({}) does not have that permission');

View File

@@ -0,0 +1,12 @@
-- RBAC command help strings
DELETE FROM `acore_string` WHERE `entry` BETWEEN 83 AND 86;
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
(83, 'Syntax: .rbac account list $account\nList granted, denied, and inherited permissions for the account.'),
(84, 'Syntax: .rbac account grant $account $permissionId [$realmId]\nGrant a permission to the account. Optional realmId (-1 = all realms).'),
(85, 'Syntax: .rbac account deny $account $permissionId [$realmId]\nDeny a permission for the account. Optional realmId (-1 = all realms).'),
(86, 'Syntax: .rbac account revoke $account $permissionId [$realmId]\nRevoke a previously granted or denied permission. Optional realmId (-1 = all realms).');
-- Update inherited permissions header to include sec level name
DELETE FROM `acore_string` WHERE `entry` = 67;
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
(67, 'Account {} ({}) inherited permissions by sec level {} ({}):');