diff options
author | UbitUmarov | 2017-05-03 16:03:26 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-03 16:03:26 +0100 |
commit | 94bb6d965e8c6e185b378546e2b84b1db8cadd80 (patch) | |
tree | 12292794e1e072730f050e6e05ab9f130c0eb6aa /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' of opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-94bb6d965e8c6e185b378546e2b84b1db8cadd80.zip opensim-SC_OLD-94bb6d965e8c6e185b378546e2b84b1db8cadd80.tar.gz opensim-SC_OLD-94bb6d965e8c6e185b378546e2b84b1db8cadd80.tar.bz2 opensim-SC_OLD-94bb6d965e8c6e185b378546e2b84b1db8cadd80.tar.xz |
change taskInventory copy/move to agents inventory rules
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 18d164f..4c4a8a5 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1678,7 +1678,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1678 | return false; | 1678 | return false; |
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | |||
1682 | private bool CanReturnObjects(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects) | 1681 | private bool CanReturnObjects(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects) |
1683 | { | 1682 | { |
1684 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1683 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
@@ -2289,23 +2288,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
2289 | if (sog == null) | 2288 | if (sog == null) |
2290 | return false; | 2289 | return false; |
2291 | 2290 | ||
2292 | uint perms = GetObjectPermissions(userID, sog, true); | 2291 | if(sog.OwnerID == userID || IsAdministrator(userID)) |
2293 | if((perms & (uint)PermissionMask.Modify) == 0) | 2292 | return true; |
2294 | return false; | 2293 | |
2295 | 2294 | if(sog.IsAttachment) | |
2296 | TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID); | ||
2297 | if(ti == null) | ||
2298 | return false; | 2295 | return false; |
2299 | 2296 | ||
2300 | uint itperms = GetObjectItemPermissions(userID, ti); | 2297 | UUID sogGroupID = sog.GroupID; |
2301 | 2298 | ||
2302 | if((itperms & (uint)PermissionMask.Copy) == 0) | 2299 | if(sogGroupID == UUID.Zero || sogGroupID != sog.OwnerID) |
2303 | return false; | 2300 | return false; |
2304 | 2301 | ||
2305 | if(sog.OwnerID != userID && (itperms & (uint)PermissionMask.Transfer) == 0) | 2302 | TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID); |
2303 | if(ti == null) | ||
2306 | return false; | 2304 | return false; |
2307 | 2305 | ||
2308 | return true; | 2306 | ulong powers = 0; |
2307 | if(GroupMemberPowers(sogGroupID, userID, ref powers)) | ||
2308 | { | ||
2309 | if(powers == (ulong)GroupPowers.ObjectManipulate) | ||
2310 | return true; | ||
2311 | |||
2312 | if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0) | ||
2313 | return true; | ||
2314 | } | ||
2315 | return false; | ||
2309 | } | 2316 | } |
2310 | 2317 | ||
2311 | // object inventory to object inventory item drag and drop | 2318 | // object inventory to object inventory item drag and drop |