Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 1 of 1

Thread: How to RBAC

  1. #1
    Graphics Guru

    Join Date
    Feb 2009
    Posts
    1,377
    Post Thanks / Like
    Rep Power
    22
    Reputation
    382

    How to RBAC


    Register to remove this ad
    ello guys! It comes to my attention that people are having difficulties trying to communicate with this RBAC system that shouldn't have been implemented because it generates more support! Anyway, let's begin, shall we?
    Contents:



    • 1. Understanding the commands and tables
    • -1.1. List of the Permissions / Other - SQL Structure of all the RBAC tables (DEFAULT)
    • -1.2. Knowing your configuration
    • 2 Giving GM Permissions
    • 2.1 Giving Full Administrator permissions
    • 2.2 Explaining rbac_linked_permissions



    BEFORE CONTINUING:

    Make sure you HAVE all of the data you're suppose to have in each table besides rbac_account_permissions. If you're missing table data, make sure the queries actually went through and didn't error.



    ~ List of the Permissions / Other - SQL Structure of all the RBAC tables (DEFAULT) ~

    TrinityCore's RBAC (wiki) documentation:
    RBAC: Role based Access Control - TrinityCore - KPsN Collaboration Platform

    TrinityCore staff has been updating this shit system so bare with me if this is outdated. If this is outdated, post in this thread or make a new thread in the support regarding if it is outdated.

    ~ Understanding the commands and tables ~



    This is rather simple, so let's start off with the tables before heading into the commands right away.

    You should have the following tables:





    • rbac_account_permissions -- Holds data of accounts that have permissions
    • rbac_permissions -- Holds data of permission Id/Names
    • rbac_default_permissions -- Holds data of default permissions
    • rbac_linked_permissions -- Holds data of linked permissions for other permissions to access


    Now, the main tables that you will be inserting data into are (by default if you don't have custom commands):

    rbac_account_permissions

    The rbac_permissions holds all the permissions for you to access in "rbac_account_permissions". However, if you're wanting to make a custom command or a default permission setup, you have to edit rbac_default_permissions with the default permissions and rbac_linked_permission with the new default secID you made and link permissions you want to it.

    (NOTE): You can select a player ingame and type in these commands to view their groups/permissions/roles without specifying their account name.

    .: KNOWING YOUR COMMANDS :.

    The main commands you'll most likely use are:

    rbac account
    rbac account list
    rbac account grant
    rbac account deny
    rbac account revoke
    rbac list

    To see the command arguments, see cs_rbac.cpp for the correct syntax.

    (NOTE): You can select a player ingame and type in these commands to assign their groups/permissions/roles without specifying their account name.

    ~ Giving GM Permissions ~

    NOTE: Make sure you add the account's security type in the account_access table.

    Now, I tested with this and came up with the results. To give a GameMaster Player, Moderator and GM Permissions, you will need to set their groups, permission (Specific commands only) and role. Don't get me wrong, it works perfectly.

    To do this, we'll use a basic SQL query.

    .: By SQL Query :.


    NOTE:
    Look in rbac_default_permissions for the default permissions.
    ok in rbac_default_permissions for the default permissions.

    To grant your GameMaster permissions do:
    Code:
    INSERT INTO `rbac_account_permissions` (`accountId`, `permissionId`, `granted`, `realmId`) VALUES
    ('2', '193', '1', '-1');
    YOU CAN REPLACE THE VALUES WITH YOUR OWN. THEY ARE SPECIFIC AND CAN EASILY BE CHANGED.


    ~ Giving Full Administrator Permissions (All commands) ~
    NOTE: Make sure you add the account's security type in the account_access table.
    NOTE:
    Look in rbac_default_permissions for the default permissions.


    To do this, we'll use a basic SQL query
    .
    .: By SQL Query :.
    Code:
    INSERT INTO `rbac_account_permissions` (`accountId`, `permissionId`, `granted`, `realmId`) VALUES
    ('2', '192', '1', '-1');
    YOU CAN REPLACE THE VALUES WITH YOUR OWN. THEY ARE SPECIFIC AND CAN EASILY BE CHANGED.


    ALWAYS REMEMBER: -1 is ALL REALMS. You can set permissions to a specific realm, for example 1, 2, 3, etc.. (RealmID goes by the amount of realms you have.)

    ~ Explaining rbac_linked_permissions ~
    If you have a new custom permissionID or you want to edit an existing permissions linked permissions -- then this is what this table is for.

    FOR EXAMPLE:
    If I wanted let's say permissionID 199 (Player Commands) to have the permission 672, I would do this:

    Code:
    INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES (199, 672);


    When I query that above to my DB, I linked permissionID (Player Commands) with 672. That means permission 199 Player Commands will have the command: reload npc_trainer. This is only an example, you don't really want to give the player command permission that command. :P
    So, it makes sense, right? You link each permission in `linkedId` you want a permission to have.


    I hope you enjoyed this guide on how to fully comprehend the RBAC system.



    › See More: How to RBAC
    Last edited by Wise; 11-03-13 at 03:06 AM.



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

 

 

Visitors found this page by searching for:

trinity rbac

trinitycore rbac

rbac trinity

r bac manager trinity core

how to rbac in trinitycore

rbac settings trinitycore

gm permission

trinitycore rbac add groups

how to become wow admin rbac

add rbac in register page trintycore

rbac make gm trinity

default rbac tables

trinity how to make admin account with rbac system

how to set gm on trinity rbac

trinitycore neuen RBAC system

rbac system trinitycore

rbac commands trinitycore

trinitycore rbac wiki

trinitycore rbac system remove

how gm rbac

rbac permissions trinitycore

trinity rbac sql

in trinitycore how can i setup the rbac

trinity core removing rbac

trinity core rbac tables

rbac и account access trinity

trinity rbac do i need to set account_access

SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 11:33 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org