Jump to content
  • 0

Question

Hello guys, I've made a custom security levels on the core -> common.h file

then worked on the RBAC permissions through Database, the first custom rank commands work ingame fine, but when i use .commands nothing happen so they guy who'll have this rank will need to test all Trinitycore commands to know what's available for him, I've done a lot of tries like attaching command: .commands to the permission id but still not working.

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Utilizing custom ranks & RBAC requires you to define the default permissions associated with the security id (sec_id).

Additionally you will need to define these permissions in rbac_linked_permissions. 

A key point to remember is that RBAC uses a hierarchical type system; where one rank encompasses all permissions of lower ranks. 

if you would like additional help on setting up your RBAC, please provide us with you rank structure from your common.h file and we can put to get some queries to get you started.

 

~hope this help

Share this post


Link to post
Share on other sites
  • 0
enum AccountTypes
{
    SEC_PLAYER         = 0,
    SEC_MODERATOR      = 1,
    SEC_GAMEMASTER     = 2,
    SEC_HGAMEMASTER = 3,
    SEC_DEVELOPER = 4,
    SEC_HDEVELOPER = 5,
    SEC_MANAGER = 6,
    SEC_ADMINISTRATOR  = 7,
    SEC_CONSOLE        = 8     
}

these are the custom ranks i made, and in rbac i did that

INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (3, 192, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (2, 193, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (1, 194, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (0, 195, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (4, 900, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (5, 901, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (6, 902, -1);
INSERT INTO `rbac_default_permissions` (`secId`, `permissionId`, `realmId`) VALUES (7, 903, -1);
--
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (900, 'Role: Sec Level Developer');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (901, 'Role: Sec Level Head Developer');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (902, 'Role: Sec Level Manager');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (903, 'Role: Sec Level Administrator');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (904, 'Role: Developer Commands');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (905, 'Role: Head Developer Commands');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (906, 'Role: Manager Commands');
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (907, 'Role: Administrator Commands');

and then managed the permission that each rank will have through rbac_linked_permissions

Share this post


Link to post
Share on other sites
  • 0
13 hours ago, Jiinx said:

Thanks a lot Bud! but you had a mistake there and i fixed it

insert ignore into rbac_permissions values
	-- RBAC: Player Permissions (unchanged)
	(195, 3), -- Join Normal Battleground
	(195, 4), -- Join Random Battleground
	(195, 5), -- Join Arenas
	(195, 6), -- Join Dungeon Finder
    
    -- should be
    
    insert ignore into rbac_linked_permissions values
	-- RBAC: Player Permissions (unchanged)
	(195, 3), -- Join Normal Battleground
	(195, 4), -- Join Random Battleground
	(195, 5), -- Join Arenas
	(195, 6), -- Join Dungeon Finder

, that's much appreciated mate.

Share this post


Link to post
Share on other sites
  • 0

Nice catch.. I did build this file manually so tbh honest I'm surprised that was the only mistake ( :D ). I've updated the gist

Glad it helped, marking resovled

Share this post


Link to post
Share on other sites
  • 0

The question(s) in this support topic have been answered and the topic author has resolved their issue. This topic is now closed. If you have other questions, please open a new topic.

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

About us

MMO-Society is the Forum former known as Lordcraft, MMO-Society offers various of Resources to help you evolve your knowledge within Emulation, In the process we make sure to form a strong community bond in-between each other and thus we are proud to can admit that MMO-Society is possibly the friendliest Community Forum to currently exist.

Useful Quick-Links

×
×
  • Create New...