diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 2d62b50..e611897 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -183,8 +183,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
183 | part.SendFullUpdate(remoteClient); | 183 | part.SendFullUpdate(remoteClient); |
184 | 184 | ||
185 | // A prim is only tainted if it's allowed to be edited by the person clicking it. | 185 | // A prim is only tainted if it's allowed to be edited by the person clicking it. |
186 | if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId) | 186 | if (Permissions.CanChangeSelectedState(sog.UUID, (ScenePresence)remoteClient.SceneAgent)) |
187 | || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId)) | ||
188 | { | 187 | { |
189 | part.IsSelected = true; | 188 | part.IsSelected = true; |
190 | EventManager.TriggerParcelPrimCountTainted(); | 189 | EventManager.TriggerParcelPrimCountTainted(); |
@@ -250,8 +249,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
250 | // handled by group, but by prim. Legacy cruft. | 249 | // handled by group, but by prim. Legacy cruft. |
251 | // TODO: Make selection flagging per prim! | 250 | // TODO: Make selection flagging per prim! |
252 | // | 251 | // |
253 | if (Permissions.CanEditObject(part.ParentGroup.UUID, remoteClient.AgentId) | 252 | if (Permissions.CanChangeSelectedState(part.ParentGroup.UUID, (ScenePresence)remoteClient.SceneAgent)) |
254 | || Permissions.CanMoveObject(part.ParentGroup.UUID, remoteClient.AgentId)) | ||
255 | { | 253 | { |
256 | part.IsSelected = false; | 254 | part.IsSelected = false; |
257 | if (!part.ParentGroup.IsAttachment && oldgprSelect != part.ParentGroup.IsSelected) | 255 | if (!part.ParentGroup.IsAttachment && oldgprSelect != part.ParentGroup.IsSelected) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index e045c43..8f32b03 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -404,6 +404,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
404 | 404 | ||
405 | #endregion | 405 | #endregion |
406 | 406 | ||
407 | #region persence EDIT or MOVE OBJECT | ||
408 | private const uint CANSELECTMASK = (uint)( | ||
409 | PrimFlags.ObjectMove | | ||
410 | PrimFlags.ObjectModify | | ||
411 | PrimFlags.ObjectOwnerModify | ||
412 | ); | ||
413 | |||
414 | public bool CanChangeSelectedState(UUID objectID, ScenePresence sp) | ||
415 | { | ||
416 | uint perms = GenerateClientFlags(sp , objectID); | ||
417 | return (perms & CANSELECTMASK) != 0; | ||
418 | } | ||
419 | |||
420 | #endregion | ||
407 | #region EDIT OBJECT | 421 | #region EDIT OBJECT |
408 | public bool CanEditObject(UUID objectID, UUID editorID) | 422 | public bool CanEditObject(UUID objectID, UUID editorID) |
409 | { | 423 | { |