roles_constants.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /**
  2. * @file roles_constants.h
  3. * @brief General Roles Constants
  4. *
  5. * $LicenseInfo:firstyear=2006&license=viewergpl$
  6. *
  7. * Copyright (c) 2006-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_ROLES_CONSTANTS_H
  33. #define LL_ROLES_CONSTANTS_H
  34. // This value includes the everyone group.
  35. constexpr S32 MAX_ROLES = 10;
  36. enum LLRoleMemberChangeType
  37. {
  38. RMC_ADD,
  39. RMC_REMOVE,
  40. RMC_NONE
  41. };
  42. enum LLRoleChangeType
  43. {
  44. RC_UPDATE_NONE,
  45. RC_UPDATE_DATA,
  46. RC_UPDATE_POWERS,
  47. RC_UPDATE_ALL,
  48. RC_CREATE,
  49. RC_DELETE
  50. };
  51. //
  52. // Powers
  53. //
  54. // KNOWN HOLES: use these for any single bit powers you need
  55. // bit 0x1LL << 52 and above
  56. // These powers were removed to make group roles simpler
  57. // bit 0x1LL << 41 (GP_ACCOUNTING_VIEW)
  58. // bit 0x1LL << 46 (GP_PROPOSAL_VIEW) - now reused as GP_LAND_ALLOW_ENVIRONMENT
  59. constexpr U64 GP_NO_POWERS = 0x0;
  60. constexpr U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL;
  61. // Membership
  62. constexpr U64 GP_MEMBER_INVITE = 0x1LL << 1; // Invite member
  63. constexpr U64 GP_MEMBER_EJECT = 0x1LL << 2; // Eject member from group
  64. constexpr U64 GP_MEMBER_OPTIONS = 0x1LL << 3; // Toggle "Open enrollment" and change "Signup Fee"
  65. constexpr U64 GP_MEMBER_VISIBLE_IN_DIR = 0x1LL << 47;
  66. // Roles
  67. constexpr U64 GP_ROLE_CREATE = 0x1LL << 4; // Create new roles
  68. constexpr U64 GP_ROLE_DELETE = 0x1LL << 5; // Delete roles
  69. constexpr U64 GP_ROLE_PROPERTIES = 0x1LL << 6; // Change Role Names, Titles, and Descriptions (Of roles the user is in, only, or any role in group?)
  70. constexpr U64 GP_ROLE_ASSIGN_MEMBER_LIMITED = 0x1LL << 7; // Assign Member to a Role that the assigner is in
  71. constexpr U64 GP_ROLE_ASSIGN_MEMBER = 0x1LL << 8; // Assign Member to Role
  72. constexpr U64 GP_ROLE_REMOVE_MEMBER = 0x1LL << 9; // Remove Member from Role
  73. constexpr U64 GP_ROLE_CHANGE_ACTIONS = 0x1LL << 10; // Change actions a role can perform
  74. // Group Identity
  75. constexpr U64 GP_GROUP_CHANGE_IDENTITY = 0x1LL << 11; // Charter, insignia, 'Show In Group List', 'Publish on the web', 'Mature', all 'Show Member In Group Profile' checkboxes
  76. // Parcel Management
  77. constexpr U64 GP_LAND_DEED = 0x1LL << 12; // Deed Land and Buy Land for Group
  78. constexpr U64 GP_LAND_RELEASE = 0x1LL << 13; // Release Land (to Gov. Linden)
  79. constexpr U64 GP_LAND_SET_SALE_INFO = 0x1LL << 14; // Set for sale info (Toggle "For Sale", Set Price, Set Target, Toggle "Sell objects with the land")
  80. constexpr U64 GP_LAND_DIVIDE_JOIN = 0x1LL << 15; // Divide and Join Parcels
  81. // Parcel Identity
  82. constexpr U64 GP_LAND_FIND_PLACES = 0x1LL << 17; // Toggle "Show in Find Places" and Set Category.
  83. constexpr U64 GP_LAND_CHANGE_IDENTITY = 0x1LL << 18; // Change Parcel Identity: Parcel Name, Parcel Description, Snapshot, 'Publish on the web', and 'Mature' checkbox
  84. constexpr U64 GP_LAND_SET_LANDING_POINT = 0x1LL << 19; // Set Landing Point
  85. // Parcel Settings
  86. constexpr U64 GP_LAND_CHANGE_MEDIA = 0x1LL << 20; // Change Media Settings
  87. constexpr U64 GP_LAND_EDIT = 0x1LL << 21; // Toggle Edit Land
  88. constexpr U64 GP_LAND_OPTIONS = 0x1LL << 22; // Toggle Set Home Point, Fly, Outside Scripts, Create/Edit Objects, Landmark, and Damage checkboxes
  89. // Parcel Powers
  90. constexpr U64 GP_LAND_ALLOW_EDIT_LAND = 0x1LL << 23; // Bypass Edit Land Restriction
  91. constexpr U64 GP_LAND_ALLOW_FLY = 0x1LL << 24; // Bypass Fly Restriction
  92. constexpr U64 GP_LAND_ALLOW_CREATE = 0x1LL << 25; // Bypass Create/Edit Objects Restriction
  93. constexpr U64 GP_LAND_ALLOW_LANDMARK = 0x1LL << 26; // Bypass Landmark Restriction
  94. constexpr U64 GP_LAND_ALLOW_SET_HOME = 0x1LL << 28; // Bypass Set Home Point Restriction
  95. constexpr U64 GP_LAND_ALLOW_HOLD_EVENT = 0x1LL << 41; // Allowed to hold events on group-owned land
  96. constexpr U64 GP_LAND_ALLOW_ENVIRONMENT = 0x1LL << 46; // Allowed to change the environment (EEP)
  97. // Parcel Access
  98. constexpr U64 GP_LAND_MANAGE_ALLOWED = 0x1LL << 29; // Manage Allowed List
  99. constexpr U64 GP_LAND_MANAGE_BANNED = 0x1LL << 30; // Manage Banned List
  100. constexpr U64 GP_LAND_MANAGE_PASSES = 0x1LL << 31; // Change Sell Pass Settings
  101. constexpr U64 GP_LAND_ADMIN = 0x1LL << 32; // Eject and Freeze Users on the land
  102. // Parcel Content
  103. constexpr U64 GP_LAND_RETURN_GROUP_SET = 0x1LL << 33; // Return objects on parcel that are set to group
  104. constexpr U64 GP_LAND_RETURN_NON_GROUP = 0x1LL << 34; // Return objects on parcel that are not set to group
  105. constexpr U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group
  106. // Select a power-bit based on an object's relationship to a parcel.
  107. constexpr U64 GP_LAND_RETURN = GP_LAND_RETURN_GROUP_OWNED
  108. | GP_LAND_RETURN_GROUP_SET
  109. | GP_LAND_RETURN_NON_GROUP;
  110. constexpr U64 GP_LAND_GARDENING = 0x1LL << 35; // Parcel Gardening - plant and move linden trees
  111. // Object Management
  112. constexpr U64 GP_OBJECT_DEED = 0x1LL << 36; // Deed Object
  113. constexpr U64 GP_OBJECT_MANIPULATE = 0x1LL << 38; // Manipulate Group Owned Objects (Move, Copy, Mod)
  114. constexpr U64 GP_OBJECT_SET_SALE = 0x1LL << 39; // Set Group Owned Object for Sale
  115. // Accounting
  116. constexpr U64 GP_ACCOUNTING_ACCOUNTABLE = 0x1LL << 40; // Pay Group Liabilities and Receive Group Dividends
  117. // Notices
  118. constexpr U64 GP_NOTICES_SEND = 0x1LL << 42; // Send Notices
  119. constexpr U64 GP_NOTICES_RECEIVE = 0x1LL << 43; // Receive Notices and View Notice History
  120. #if 0 // Deprecated (were used for group voting)
  121. // Proposals
  122. constexpr U64 GP_PROPOSAL_START = 0x1LL << 44; // Start Proposal
  123. constexpr U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal
  124. #endif
  125. // Group chat moderation related
  126. constexpr U64 GP_SESSION_JOIN = 0x1LL << 16; // Can join session
  127. constexpr U64 GP_SESSION_VOICE = 0x1LL << 27; // Can hear/talk
  128. constexpr U64 GP_SESSION_MODERATOR = 0x1LL << 37; // Can mute people's session
  129. // Experience tools related
  130. constexpr U64 GP_EXPERIENCE_ADMIN = 0x1LL << 49; // has admin rights to any experiences owned by this group
  131. constexpr U64 GP_EXPERIENCE_CREATOR = 0x1LL << 50; // can sign scripts for experiences owned by this group
  132. // Group Banning
  133. constexpr U64 GP_GROUP_BAN_ACCESS = 0x1LL << 51; // Allows access to ban / un-ban agents from a group.
  134. constexpr U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE
  135. | GP_LAND_ALLOW_SET_HOME
  136. | GP_NOTICES_RECEIVE
  137. | GP_SESSION_JOIN
  138. | GP_SESSION_VOICE;
  139. constexpr U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBER
  140. | GP_GROUP_CHANGE_IDENTITY
  141. | GP_LAND_ADMIN
  142. | GP_LAND_ALLOW_EDIT_LAND
  143. | GP_LAND_ALLOW_FLY
  144. | GP_LAND_ALLOW_CREATE
  145. | GP_LAND_ALLOW_ENVIRONMENT
  146. | GP_LAND_ALLOW_LANDMARK
  147. | GP_LAND_CHANGE_IDENTITY
  148. | GP_LAND_CHANGE_MEDIA
  149. | GP_LAND_DEED
  150. | GP_LAND_DIVIDE_JOIN
  151. | GP_LAND_EDIT
  152. | GP_LAND_FIND_PLACES
  153. | GP_LAND_GARDENING
  154. | GP_LAND_MANAGE_ALLOWED
  155. | GP_LAND_MANAGE_BANNED
  156. | GP_LAND_MANAGE_PASSES
  157. | GP_LAND_OPTIONS
  158. | GP_LAND_RELEASE
  159. | GP_LAND_RETURN_GROUP_OWNED
  160. | GP_LAND_RETURN_GROUP_SET
  161. | GP_LAND_RETURN_NON_GROUP
  162. | GP_LAND_SET_LANDING_POINT
  163. | GP_LAND_SET_SALE_INFO
  164. | GP_MEMBER_EJECT
  165. | GP_MEMBER_INVITE
  166. | GP_MEMBER_OPTIONS
  167. | GP_MEMBER_VISIBLE_IN_DIR
  168. | GP_NOTICES_SEND
  169. | GP_OBJECT_DEED
  170. | GP_OBJECT_MANIPULATE
  171. | GP_OBJECT_SET_SALE
  172. | GP_ROLE_ASSIGN_MEMBER_LIMITED
  173. | GP_ROLE_PROPERTIES
  174. | GP_SESSION_MODERATOR;
  175. #endif