752 _id(id), _name(name), _perms() { }
755 std::string
const&
GetName()
const {
return _name; }
787 _id(id), _name(name), _realmId(realmId), _secLevel(secLevel),
788 _grantedPerms(), _deniedPerms(), _globalPerms() { }
791 std::string
const&
GetName()
const {
return _name; }
813 return _globalPerms.find(permission) != _globalPerms.end();
926 void CalculateNewPermissions();
936 return _grantedPerms.find(permissionId) != _grantedPerms.end();
942 return _deniedPerms.find(permissionId) != _deniedPerms.end();
948 _grantedPerms.insert(permissionId);
954 _grantedPerms.erase(permissionId);
960 _deniedPerms.insert(permissionId);
966 _deniedPerms.erase(permissionId);
970 void AddPermissions(RBACPermissionContainer
const& permsFrom, RBACPermissionContainer& permsTo);
973 void RemovePermissions(RBACPermissionContainer& permsFrom, RBACPermissionContainer
const& permsToRemove);
982 void ExpandPermissions(RBACPermissionContainer& permissions);
void SetSecurityLevel(uint8 id)
Sets security level.
Definition: RBAC.h:903
RBACPermissionContainer const & GetDeniedPermissions() const
Returns all the denied permissions.
Definition: RBAC.h:822
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
uint32 _id
Definition: RBAC.h:767
uint8 GetSecurityLevel() const
Returns the security level assigned.
Definition: RBAC.h:910
void AddDeniedPermission(uint32 permissionId)
Adds a new denied permission.
Definition: RBAC.h:958
void AddGrantedPermission(uint32 permissionId)
Adds a new granted permission.
Definition: RBAC.h:946
Realm realm
Definition: World.cpp:3485
void LoadFromDB()
Definition: AddonMgr.cpp:40
uint8 _secLevel
RealmId Affected
Definition: RBAC.h:987
RBACCommandResult
Definition: RBAC.h:736
std::string const & GetName() const
Gets the Name of the Object.
Definition: RBAC.h:755
bool HasGrantedPermission(uint32 permissionId) const
Checks if a permission is granted.
Definition: RBAC.h:934
RBACPermissionContainer const & GetLinkedPermissions() const
Gets the Permissions linked to this permission.
Definition: RBAC.h:760
Definition: AccountMgr.h:47
int32 _realmId
Account name
Definition: RBAC.h:986
RBACPermissionContainer _deniedPerms
Granted permissions
Definition: RBAC.h:989
bool HasPermission(uint32 permission) const
Definition: RBAC.h:811
std::string _name
id of the object
Definition: RBAC.h:768
RBACPermissions
Definition: RBAC.h:51
RBACPermissionContainer _grantedPerms
Account SecurityLevel
Definition: RBAC.h:988
void RemoveGrantedPermission(uint32 permissionId)
Removes a granted permission.
Definition: RBAC.h:952
uint32 GetId() const
Gets the Id of the Object.
Definition: RBAC.h:793
bool HasDeniedPermission(uint32 permissionId) const
Checks if a permission is denied.
Definition: RBAC.h:940
std::string const & GetName() const
Gets the Name of the Object.
Definition: RBAC.h:791
void RemoveLinkedPermission(uint32 id)
Removes a linked Permission.
Definition: RBAC.h:764
void AddLinkedPermission(uint32 id)
Adds a new linked Permission.
Definition: RBAC.h:762
uint32 GetId() const
Gets the Id of the Object.
Definition: RBAC.h:757
RBACPermission(uint32 id=0, std::string const &name="")
Definition: RBAC.h:751
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
std::string _name
Account id
Definition: RBAC.h:985
RBACPermissionContainer const & GetPermissions() const
Returns all the granted permissions (after computation)
Definition: RBAC.h:818
int32 GetRealmId() const
Definition: RBAC.h:928
RBACPermissionContainer const & GetGrantedPermissions() const
Returns all the granted permissions.
Definition: RBAC.h:820
std::future< PreparedQueryResult > PreparedQueryResultFuture
Definition: Callback.h:26
RBACPermissionContainer _globalPerms
Denied permissions
Definition: RBAC.h:990
#define TC_GAME_API
Definition: Define.h:134
RBACPermissionContainer _perms
name of the object
Definition: RBAC.h:769
uint8_t uint8
Definition: Define.h:152
void RemoveDeniedPermission(uint32 permissionId)
Removes a denied permission.
Definition: RBAC.h:964
uint32 _id
Definition: RBAC.h:984
std::set< uint32 > RBACPermissionContainer
Definition: RBAC.h:746
RBACData(uint32 id, std::string const &name, int32 realmId, uint8 secLevel=255)
Definition: RBAC.h:786