aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/PermissionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/PermissionManager.cs')
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs49
1 files changed, 26 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 9640ed7..6c49586 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -170,31 +170,9 @@ namespace OpenSim.Region.Environment
170 // the administrator object permissions to take effect. 170 // the administrator object permissions to take effect.
171 LLUUID objectOwner = task.OwnerID; 171 LLUUID objectOwner = task.OwnerID;
172 172
173 //return task.RootPart.ObjectFlags;task.RootPart.ObjectFlags |
174
175 uint objectOwnerMask = task.RootPart.ObjectFlags; 173 uint objectOwnerMask = task.RootPart.ObjectFlags;
174 objectOwnerMask = ApplyObjectModifyMasks(task.RootPart.OwnerMask, objectOwnerMask);
176 175
177 if((task.RootPart.OwnerMask & (uint)PermissionMask.Copy) != 0)
178 {
179 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectCopy;
180 }
181
182 if ((task.RootPart.OwnerMask & (uint) PermissionMask.Move) != 0)
183 {
184 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectMove;
185 }
186
187 if ((task.RootPart.OwnerMask & (uint) PermissionMask.Modify) != 0)
188 {
189 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectModify;
190 }
191
192 if ((task.RootPart.OwnerMask & (uint) PermissionMask.Transfer) != 0)
193 {
194 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectTransfer;
195 }
196
197 uint objectGroupMask = task.RootPart.ObjectFlags | task.RootPart.GroupMask;
198 uint objectEveryoneMask = task.RootPart.ObjectFlags | task.RootPart.EveryoneMask; 176 uint objectEveryoneMask = task.RootPart.ObjectFlags | task.RootPart.EveryoneMask;
199 177
200 if (m_bypassPermissions) 178 if (m_bypassPermissions)
@@ -240,6 +218,31 @@ namespace OpenSim.Region.Environment
240 return objectEveryoneMask; 218 return objectEveryoneMask;
241 } 219 }
242 220
221
222 private uint ApplyObjectModifyMasks(uint parentMask, uint objectOwnerMask)
223 {
224 if ((parentMask & (uint)PermissionMask.Copy) != 0)
225 {
226 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectCopy;
227 }
228
229 if ((parentMask & (uint)PermissionMask.Move) != 0)
230 {
231 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectMove;
232 }
233
234 if ((parentMask & (uint)PermissionMask.Modify) != 0)
235 {
236 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectModify;
237 }
238
239 if ((parentMask & (uint)PermissionMask.Transfer) != 0)
240 {
241 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectTransfer;
242 }
243 return objectOwnerMask;
244 }
245
243 protected virtual bool GenericObjectPermission(LLUUID currentUser, LLUUID objId) 246 protected virtual bool GenericObjectPermission(LLUUID currentUser, LLUUID objId)
244 { 247 {
245 // Default: deny 248 // Default: deny