PageRenderTime 38ms CodeModel.GetById 2ms app.highlight 31ms 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
  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
 27#ifndef LL_ROLES_CONSTANTS_H
 28#define LL_ROLES_CONSTANTS_H
 29
 30// This value includes the everyone group.
 31const S32 MAX_ROLES = 10;
 32
 33enum LLRoleMemberChangeType
 34{
 35	RMC_ADD,
 36	RMC_REMOVE,
 37	RMC_NONE
 38};
 39
 40enum LLRoleChangeType
 41{
 42	RC_UPDATE_NONE,
 43	RC_UPDATE_DATA,
 44	RC_UPDATE_POWERS,
 45	RC_UPDATE_ALL,
 46	RC_CREATE,
 47	RC_DELETE
 48};
 49
 50//
 51// Powers
 52//
 53
 54// KNOWN HOLES: use these for any single bit powers you need
 55// bit 0x1 << 46
 56// bit 0x1 << 49 and above
 57
 58// These powers were removed to make group roles simpler
 59// bit 0x1 << 41 (GP_ACCOUNTING_VIEW)
 60// bit 0x1 << 46 (GP_PROPOSAL_VIEW)
 61
 62const U64 GP_NO_POWERS = 0x0;
 63const U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL;
 64
 65// Membership
 66const U64 GP_MEMBER_INVITE		= 0x1 << 1;		// Invite member
 67const U64 GP_MEMBER_EJECT			= 0x1 << 2;		// Eject member from group
 68const U64 GP_MEMBER_OPTIONS		= 0x1 << 3;		// Toggle "Open enrollment" and change "Signup Fee"
 69const U64 GP_MEMBER_VISIBLE_IN_DIR = 0x1LL << 47;
 70
 71// Roles
 72const U64 GP_ROLE_CREATE			= 0x1 << 4;		// Create new roles
 73const U64 GP_ROLE_DELETE			= 0x1 << 5;		// Delete roles
 74const U64 GP_ROLE_PROPERTIES		= 0x1 << 6;		// Change Role Names, Titles, and Descriptions (Of roles the user is in, only, or any role in group?)
 75const U64 GP_ROLE_ASSIGN_MEMBER_LIMITED = 0x1 << 7; // Assign Member to a Role that the assigner is in
 76const U64 GP_ROLE_ASSIGN_MEMBER	= 0x1 << 8;		// Assign Member to Role
 77const U64 GP_ROLE_REMOVE_MEMBER	= 0x1 << 9;		// Remove Member from Role
 78const U64 GP_ROLE_CHANGE_ACTIONS	= 0x1 << 10;	// Change actions a role can perform
 79
 80// Group Identity
 81const 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
 82
 83// Parcel Management
 84const U64 GP_LAND_DEED			= 0x1 << 12;	// Deed Land and Buy Land for Group
 85const U64 GP_LAND_RELEASE			= 0x1 << 13;	// Release Land (to Gov. Linden)
 86const 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")
 87const U64 GP_LAND_DIVIDE_JOIN		= 0x1 << 15;	// Divide and Join Parcels
 88
 89// Parcel Identity
 90const U64 GP_LAND_FIND_PLACES		= 0x1 << 17;	// Toggle "Show in Find Places" and Set Category.
 91const U64 GP_LAND_CHANGE_IDENTITY = 0x1 << 18;	// Change Parcel Identity: Parcel Name, Parcel Description, Snapshot, 'Publish on the web', and 'Mature' checkbox
 92const U64 GP_LAND_SET_LANDING_POINT = 0x1 << 19;	// Set Landing Point
 93
 94// Parcel Settings
 95const U64 GP_LAND_CHANGE_MEDIA	= 0x1 << 20;	// Change Media Settings
 96const U64 GP_LAND_EDIT			= 0x1 << 21;	// Toggle Edit Land
 97const U64 GP_LAND_OPTIONS			= 0x1 << 22;	// Toggle Set Home Point, Fly, Outside Scripts, Create/Edit Objects, Landmark, and Damage checkboxes
 98
 99// Parcel Powers
100const U64 GP_LAND_ALLOW_EDIT_LAND = 0x1 << 23;	// Bypass Edit Land Restriction
101const U64 GP_LAND_ALLOW_FLY		= 0x1 << 24;	// Bypass Fly Restriction
102const U64 GP_LAND_ALLOW_CREATE	= 0x1 << 25;	// Bypass Create/Edit Objects Restriction
103const U64 GP_LAND_ALLOW_LANDMARK	= 0x1 << 26;	// Bypass Landmark Restriction
104const U64 GP_LAND_ALLOW_SET_HOME	= 0x1 << 28;	// Bypass Set Home Point Restriction
105const U64 GP_LAND_ALLOW_HOLD_EVENT	= 0x1LL << 41;	// Allowed to hold events on group-owned land
106
107
108// Parcel Access
109const U64 GP_LAND_MANAGE_ALLOWED	= 0x1 << 29;	// Manage Allowed List
110const U64 GP_LAND_MANAGE_BANNED	= 0x1 << 30;	// Manage Banned List
111const U64 GP_LAND_MANAGE_PASSES	= 0x1LL << 31;	// Change Sell Pass Settings
112const U64 GP_LAND_ADMIN			= 0x1LL << 32;	// Eject and Freeze Users on the land
113
114// Parcel Content
115const U64 GP_LAND_RETURN_GROUP_SET	= 0x1LL << 33;	// Return objects on parcel that are set to group
116const U64 GP_LAND_RETURN_NON_GROUP	= 0x1LL << 34;	// Return objects on parcel that are not set to group
117const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48;	// Return objects on parcel that are owned by the group
118
119// Select a power-bit based on an object's relationship to a parcel.
120const U64 GP_LAND_RETURN		= GP_LAND_RETURN_GROUP_OWNED 
121								| GP_LAND_RETURN_GROUP_SET	
122								| GP_LAND_RETURN_NON_GROUP;
123
124const U64 GP_LAND_GARDENING		= 0x1LL << 35;	// Parcel Gardening - plant and move linden trees
125
126// Object Management
127const U64 GP_OBJECT_DEED			= 0x1LL << 36;	// Deed Object
128const U64 GP_OBJECT_MANIPULATE		= 0x1LL << 38;	// Manipulate Group Owned Objects (Move, Copy, Mod)
129const U64 GP_OBJECT_SET_SALE		= 0x1LL << 39;	// Set Group Owned Object for Sale
130
131// Accounting
132const U64 GP_ACCOUNTING_ACCOUNTABLE = 0x1LL << 40;	// Pay Group Liabilities and Receive Group Dividends
133
134// Notices
135const U64 GP_NOTICES_SEND			= 0x1LL << 42;	// Send Notices
136const U64 GP_NOTICES_RECEIVE		= 0x1LL << 43;	// Receive Notices and View Notice History
137
138// Proposals
139// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
140const U64 GP_PROPOSAL_START		= 0x1LL << 44;	// Start Proposal
141// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
142const U64 GP_PROPOSAL_VOTE		= 0x1LL << 45;	// Vote on Proposal
143
144// Group chat moderation related
145const U64 GP_SESSION_JOIN = 0x1LL << 16; //can join session
146const U64 GP_SESSION_VOICE = 0x1LL << 27; //can hear/talk
147const U64 GP_SESSION_MODERATOR = 0x1LL << 37; //can mute people's session
148
149const U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE
150								| GP_LAND_ALLOW_SET_HOME
151								| GP_NOTICES_RECEIVE
152								| GP_SESSION_JOIN
153								| GP_SESSION_VOICE
154								;
155
156const U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBER
157								| GP_GROUP_CHANGE_IDENTITY
158								| GP_LAND_ADMIN
159								| GP_LAND_ALLOW_EDIT_LAND
160								| GP_LAND_ALLOW_FLY
161								| GP_LAND_ALLOW_CREATE
162								| GP_LAND_ALLOW_LANDMARK
163								| GP_LAND_CHANGE_IDENTITY
164								| GP_LAND_CHANGE_MEDIA
165								| GP_LAND_DEED
166								| GP_LAND_DIVIDE_JOIN
167								| GP_LAND_EDIT
168								| GP_LAND_FIND_PLACES
169								| GP_LAND_GARDENING
170								| GP_LAND_MANAGE_ALLOWED
171								| GP_LAND_MANAGE_BANNED
172								| GP_LAND_MANAGE_PASSES
173								| GP_LAND_OPTIONS
174								| GP_LAND_RELEASE
175								| GP_LAND_RETURN_GROUP_OWNED
176								| GP_LAND_RETURN_GROUP_SET
177								| GP_LAND_RETURN_NON_GROUP
178								| GP_LAND_SET_LANDING_POINT
179								| GP_LAND_SET_SALE_INFO
180								| GP_MEMBER_EJECT
181								| GP_MEMBER_INVITE	
182								| GP_MEMBER_OPTIONS
183								| GP_MEMBER_VISIBLE_IN_DIR
184								| GP_NOTICES_SEND
185								| GP_OBJECT_DEED
186								| GP_OBJECT_MANIPULATE
187								| GP_OBJECT_SET_SALE
188								| GP_ROLE_ASSIGN_MEMBER_LIMITED
189								| GP_ROLE_PROPERTIES
190								| GP_SESSION_MODERATOR
191								;
192#endif