Check out the trinitycore documentation:
It seems that this code part is the only useful thing other than using the rank hierarchy of GM levels:
strong defaults to false, so you should use RBAC_PERM_CHECK_FOR_LOWER_SECURITY and have the config setting for the security set in worldserver.conf
// ignore only for non-players for non strong checks (when allow apply command at least to same sec level)
if (m_session->HasPermission(RBAC_PERM_CHECK_FOR_LOWER_SECURITY) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY))
So add RBAC_PERM_CHECK_FOR_LOWER_SECURITY for 6 and 7 and any other rank you want to be able to use commands on other people, or deny it from the ppl who shouldnt or do both for everyone.
Not sure what the default is.
Sadly this applies to ALL gm commands and not the specific ones for the player. So you cant enable a player to use .modify morph for players and .additem you cant use on players.
If you look at the tables and possibly check out the documentation and test around, how it works should be rather clear.
I have never touched rbac before this, but it seems that:
rbac_permissions lists all the permissions you can give
rbac_roles has all roles. You can make a custom role.
rbac_role_permissions links permissions to the roles. So this adds stuff to your role. IE instant logout, commands ..
rbac_groups has general groups, IE player is 1. You can make a custom group
rbac_group_roles links the group, IE player, to roles. So player can have many roles. Role is a little funny name though .. So this adds stuff to the group
rbac_security_level_groups links GM ranks to RBAC groups. This means that if you give someone GM rank 2, he will have all groups defined in this table. Which means that he will have all the roles defined for those groups, which means that he has all the permissions defined for all those roles in the groups.
There is no clear order like for GM ranks. There is no 184.108.40.206..
There are just IDs and the ranks.
An RBAC group ID 99 can have less permissions and be lower than group ID 10 and the other way around.