PageRenderTime 15ms CodeModel.GetById 1ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/roles_constants.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 192 lines | 113 code | 27 blank | 52 comment | 0 complexity | d6332ecd006912c4fe3807add27c9f92 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file roles_constants.h
  3. * @brief General Roles Constants
  4. *
  5. * $LicenseInfo:firstyear=2006&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_ROLES_CONSTANTS_H
  27. #define LL_ROLES_CONSTANTS_H
  28. // This value includes the everyone group.
  29. const S32 MAX_ROLES = 10;
  30. enum LLRoleMemberChangeType
  31. {
  32. RMC_ADD,
  33. RMC_REMOVE,
  34. RMC_NONE
  35. };
  36. enum LLRoleChangeType
  37. {
  38. RC_UPDATE_NONE,
  39. RC_UPDATE_DATA,
  40. RC_UPDATE_POWERS,
  41. RC_UPDATE_ALL,
  42. RC_CREATE,
  43. RC_DELETE
  44. };
  45. //
  46. // Powers
  47. //
  48. // KNOWN HOLES: use these for any single bit powers you need
  49. // bit 0x1 << 46
  50. // bit 0x1 << 49 and above
  51. // These powers were removed to make group roles simpler
  52. // bit 0x1 << 41 (GP_ACCOUNTING_VIEW)
  53. // bit 0x1 << 46 (GP_PROPOSAL_VIEW)
  54. const U64 GP_NO_POWERS = 0x0;
  55. const U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL;
  56. // Membership
  57. const U64 GP_MEMBER_INVITE = 0x1 << 1; // Invite member
  58. const U64 GP_MEMBER_EJECT = 0x1 << 2; // Eject member from group
  59. const U64 GP_MEMBER_OPTIONS = 0x1 << 3; // Toggle "Open enrollment" and change "Signup Fee"
  60. const U64 GP_MEMBER_VISIBLE_IN_DIR = 0x1LL << 47;
  61. // Roles
  62. const U64 GP_ROLE_CREATE = 0x1 << 4; // Create new roles
  63. const U64 GP_ROLE_DELETE = 0x1 << 5; // Delete roles
  64. const U64 GP_ROLE_PROPERTIES = 0x1 << 6; // Change Role Names, Titles, and Descriptions (Of roles the user is in, only, or any role in group?)
  65. const U64 GP_ROLE_ASSIGN_MEMBER_LIMITED = 0x1 << 7; // Assign Member to a Role that the assigner is in
  66. const U64 GP_ROLE_ASSIGN_MEMBER = 0x1 << 8; // Assign Member to Role
  67. const U64 GP_ROLE_REMOVE_MEMBER = 0x1 << 9; // Remove Member from Role
  68. const U64 GP_ROLE_CHANGE_ACTIONS = 0x1 << 10; // Change actions a role can perform
  69. // Group Identity
  70. const U64 GP_GROUP_CHANGE_IDENTITY = 0x1 << 11; // Charter, insignia, 'Show In Group List', 'Publish on the web', 'Mature', all 'Show Member In Group Profile' checkboxes
  71. // Parcel Management
  72. const U64 GP_LAND_DEED = 0x1 << 12; // Deed Land and Buy Land for Group
  73. const U64 GP_LAND_RELEASE = 0x1 << 13; // Release Land (to Gov. Linden)
  74. const U64 GP_LAND_SET_SALE_INFO = 0x1 << 14; // Set for sale info (Toggle "For Sale", Set Price, Set Target, Toggle "Sell objects with the land")
  75. const U64 GP_LAND_DIVIDE_JOIN = 0x1 << 15; // Divide and Join Parcels
  76. // Parcel Identity
  77. const U64 GP_LAND_FIND_PLACES = 0x1 << 17; // Toggle "Show in Find Places" and Set Category.
  78. const U64 GP_LAND_CHANGE_IDENTITY = 0x1 << 18; // Change Parcel Identity: Parcel Name, Parcel Description, Snapshot, 'Publish on the web', and 'Mature' checkbox
  79. const U64 GP_LAND_SET_LANDING_POINT = 0x1 << 19; // Set Landing Point
  80. // Parcel Settings
  81. const U64 GP_LAND_CHANGE_MEDIA = 0x1 << 20; // Change Media Settings
  82. const U64 GP_LAND_EDIT = 0x1 << 21; // Toggle Edit Land
  83. const U64 GP_LAND_OPTIONS = 0x1 << 22; // Toggle Set Home Point, Fly, Outside Scripts, Create/Edit Objects, Landmark, and Damage checkboxes
  84. // Parcel Powers
  85. const U64 GP_LAND_ALLOW_EDIT_LAND = 0x1 << 23; // Bypass Edit Land Restriction
  86. const U64 GP_LAND_ALLOW_FLY = 0x1 << 24; // Bypass Fly Restriction
  87. const U64 GP_LAND_ALLOW_CREATE = 0x1 << 25; // Bypass Create/Edit Objects Restriction
  88. const U64 GP_LAND_ALLOW_LANDMARK = 0x1 << 26; // Bypass Landmark Restriction
  89. const U64 GP_LAND_ALLOW_SET_HOME = 0x1 << 28; // Bypass Set Home Point Restriction
  90. const U64 GP_LAND_ALLOW_HOLD_EVENT = 0x1LL << 41; // Allowed to hold events on group-owned land
  91. // Parcel Access
  92. const U64 GP_LAND_MANAGE_ALLOWED = 0x1 << 29; // Manage Allowed List
  93. const U64 GP_LAND_MANAGE_BANNED = 0x1 << 30; // Manage Banned List
  94. const U64 GP_LAND_MANAGE_PASSES = 0x1LL << 31; // Change Sell Pass Settings
  95. const U64 GP_LAND_ADMIN = 0x1LL << 32; // Eject and Freeze Users on the land
  96. // Parcel Content
  97. const U64 GP_LAND_RETURN_GROUP_SET = 0x1LL << 33; // Return objects on parcel that are set to group
  98. const U64 GP_LAND_RETURN_NON_GROUP = 0x1LL << 34; // Return objects on parcel that are not set to group
  99. const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group
  100. // Select a power-bit based on an object's relationship to a parcel.
  101. const U64 GP_LAND_RETURN = GP_LAND_RETURN_GROUP_OWNED
  102. | GP_LAND_RETURN_GROUP_SET
  103. | GP_LAND_RETURN_NON_GROUP;
  104. const U64 GP_LAND_GARDENING = 0x1LL << 35; // Parcel Gardening - plant and move linden trees
  105. // Object Management
  106. const U64 GP_OBJECT_DEED = 0x1LL << 36; // Deed Object
  107. const U64 GP_OBJECT_MANIPULATE = 0x1LL << 38; // Manipulate Group Owned Objects (Move, Copy, Mod)
  108. const U64 GP_OBJECT_SET_SALE = 0x1LL << 39; // Set Group Owned Object for Sale
  109. // Accounting
  110. const U64 GP_ACCOUNTING_ACCOUNTABLE = 0x1LL << 40; // Pay Group Liabilities and Receive Group Dividends
  111. // Notices
  112. const U64 GP_NOTICES_SEND = 0x1LL << 42; // Send Notices
  113. const U64 GP_NOTICES_RECEIVE = 0x1LL << 43; // Receive Notices and View Notice History
  114. // Proposals
  115. // TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
  116. const U64 GP_PROPOSAL_START = 0x1LL << 44; // Start Proposal
  117. // TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
  118. const U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal
  119. // Group chat moderation related
  120. const U64 GP_SESSION_JOIN = 0x1LL << 16; //can join session
  121. const U64 GP_SESSION_VOICE = 0x1LL << 27; //can hear/talk
  122. const U64 GP_SESSION_MODERATOR = 0x1LL << 37; //can mute people's session
  123. const U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE
  124. | GP_LAND_ALLOW_SET_HOME
  125. | GP_NOTICES_RECEIVE
  126. | GP_SESSION_JOIN
  127. | GP_SESSION_VOICE
  128. ;
  129. const U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBER
  130. | GP_GROUP_CHANGE_IDENTITY
  131. | GP_LAND_ADMIN
  132. | GP_LAND_ALLOW_EDIT_LAND
  133. | GP_LAND_ALLOW_FLY
  134. | GP_LAND_ALLOW_CREATE
  135. | GP_LAND_ALLOW_LANDMARK
  136. | GP_LAND_CHANGE_IDENTITY
  137. | GP_LAND_CHANGE_MEDIA
  138. | GP_LAND_DEED
  139. | GP_LAND_DIVIDE_JOIN
  140. | GP_LAND_EDIT
  141. | GP_LAND_FIND_PLACES
  142. | GP_LAND_GARDENING
  143. | GP_LAND_MANAGE_ALLOWED
  144. | GP_LAND_MANAGE_BANNED
  145. | GP_LAND_MANAGE_PASSES
  146. | GP_LAND_OPTIONS
  147. | GP_LAND_RELEASE
  148. | GP_LAND_RETURN_GROUP_OWNED
  149. | GP_LAND_RETURN_GROUP_SET
  150. | GP_LAND_RETURN_NON_GROUP
  151. | GP_LAND_SET_LANDING_POINT
  152. | GP_LAND_SET_SALE_INFO
  153. | GP_MEMBER_EJECT
  154. | GP_MEMBER_INVITE
  155. | GP_MEMBER_OPTIONS
  156. | GP_MEMBER_VISIBLE_IN_DIR
  157. | GP_NOTICES_SEND
  158. | GP_OBJECT_DEED
  159. | GP_OBJECT_MANIPULATE
  160. | GP_OBJECT_SET_SALE
  161. | GP_ROLE_ASSIGN_MEMBER_LIMITED
  162. | GP_ROLE_PROPERTIES
  163. | GP_SESSION_MODERATOR
  164. ;
  165. #endif