aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs32
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs7
2 files changed, 21 insertions, 18 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index f72ae66..9640ed7 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment
240 return objectEveryoneMask; 240 return objectEveryoneMask;
241 } 241 }
242 242
243 protected virtual bool GenericObjectPermission(LLUUID user, LLUUID objId) 243 protected virtual bool GenericObjectPermission(LLUUID currentUser, LLUUID objId)
244 { 244 {
245 // Default: deny 245 // Default: deny
246 bool permission = false; 246 bool permission = false;
@@ -256,32 +256,40 @@ namespace OpenSim.Region.Environment
256 return false; 256 return false;
257 } 257 }
258 258
259 SceneObjectGroup task = (SceneObjectGroup) m_scene.Entities[objId]; 259 SceneObjectGroup group = (SceneObjectGroup) m_scene.Entities[objId];
260 LLUUID taskOwner = null; 260
261 // Added this because at this point in time it wouldn't be wise for 261 LLUUID objectOwner = group.OwnerID;
262 // the administrator object permissions to take effect.
263 LLUUID objectOwner = task.OwnerID;
264 262
265 // Object owners should be able to edit their own content 263 // Object owners should be able to edit their own content
266 if (user == objectOwner) 264 if (currentUser == objectOwner)
265 {
267 permission = true; 266 permission = true;
267 }
268 268
269 // Users should be able to edit what is over their land. 269 // Users should be able to edit what is over their land.
270 Land parcel = m_scene.LandManager.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); 270 Land parcel = m_scene.LandManager.getLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
271 if (parcel != null && parcel.landData.ownerID == user) 271 if ((parcel != null) && ( parcel.landData.ownerID == currentUser))
272 {
272 permission = true; 273 permission = true;
274 }
273 275
274 // Estate users should be able to edit anything in the sim 276 // Estate users should be able to edit anything in the sim
275 if (IsEstateManager(user)) 277 if (IsEstateManager(currentUser))
278 {
276 permission = true; 279 permission = true;
280 }
277 281
278 // Admin objects should not be editable by the above 282 // Admin objects should not be editable by the above
279 if (IsAdministrator(taskOwner)) 283 if (IsAdministrator(objectOwner))
284 {
280 permission = false; 285 permission = false;
286 }
281 287
282 // Admin should be able to edit anything in the sim (including admin objects) 288 // Admin should be able to edit anything in the sim (including admin objects)
283 if (IsAdministrator(user)) 289 if (IsAdministrator(currentUser))
290 {
284 permission = true; 291 permission = true;
292 }
285 293
286 return permission; 294 return permission;
287 } 295 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index ce38bee..20e761f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1572,12 +1572,7 @@ namespace OpenSim.Region.Environment.Scenes
1572 lPos = OffsetPosition; 1572 lPos = OffsetPosition;
1573 SendFullUpdateToClient(remoteClient, lPos, clientflags); 1573 SendFullUpdateToClient(remoteClient, lPos, clientflags);
1574 } 1574 }
1575 1575
1576 /// <summary>
1577 ///
1578 /// </summary>
1579 /// <param name="remoteClient"></param>
1580 /// <param name="lPos"></param>
1581 public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags) 1576 public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags)
1582 { 1577 {
1583 LLQuaternion lRot; 1578 LLQuaternion lRot;