Add permission CanChangeSelectedState replacing 2 calls to check Move and Modify/edit. As those calls did, this controls changes to objects selected state for edition (simulation hold etc).

This commit is contained in:
UbitUmarov
2017-01-12 17:15:36 +00:00
parent 3e0a61915f
commit 1984f316fc
2 changed files with 16 additions and 4 deletions

View File

@@ -183,8 +183,7 @@ namespace OpenSim.Region.Framework.Scenes
part.SendFullUpdate(remoteClient);
// A prim is only tainted if it's allowed to be edited by the person clicking it.
if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
|| Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
if (Permissions.CanChangeSelectedState(sog.UUID, (ScenePresence)remoteClient.SceneAgent))
{
part.IsSelected = true;
EventManager.TriggerParcelPrimCountTainted();
@@ -250,8 +249,7 @@ namespace OpenSim.Region.Framework.Scenes
// handled by group, but by prim. Legacy cruft.
// TODO: Make selection flagging per prim!
//
if (Permissions.CanEditObject(part.ParentGroup.UUID, remoteClient.AgentId)
|| Permissions.CanMoveObject(part.ParentGroup.UUID, remoteClient.AgentId))
if (Permissions.CanChangeSelectedState(part.ParentGroup.UUID, (ScenePresence)remoteClient.SceneAgent))
{
part.IsSelected = false;
if (!part.ParentGroup.IsAttachment && oldgprSelect != part.ParentGroup.IsSelected)