aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Permissions
diff options
context:
space:
mode:
authorUbitUmarov2017-01-19 19:01:56 +0000
committerUbitUmarov2017-01-19 19:01:56 +0000
commit69bcbd856b8785b2912fa4ceac7411967756107c (patch)
tree81c322e6ea426580044ede6b05934fb660fdcf38 /OpenSim/Region/CoreModules/World/Permissions
parentactually make use of it as viewers requested (diff)
downloadopensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.zip
opensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.tar.gz
opensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.tar.bz2
opensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.tar.xz
change CanDuplicateObject
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index b4c5072..341bd7e 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1221,24 +1221,23 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1221 return IsAdministrator(user); 1221 return IsAdministrator(user);
1222 } 1222 }
1223 1223
1224 private bool CanDuplicateObject(int objectCount, UUID objectID, UUID userID, Scene scene, Vector3 objectPosition) 1224 private bool CanDuplicateObject(SceneObjectGroup sog, ScenePresence sp, Scene scene)
1225 { 1225 {
1226 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1226 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1227 if (m_bypassPermissions) return m_bypassPermissionsValue; 1227 if (m_bypassPermissions) return m_bypassPermissionsValue;
1228 1228
1229 SceneObjectGroup sog = scene.GetGroupByPrim(objectID); 1229 if (sog == null || sog.IsDeleted || sp == null || sp.IsDeleted)
1230 if (sog == null)
1231 return false; 1230 return false;
1232 1231
1233 uint perms = GetObjectPermissions(userID, sog, false); 1232 uint perms = GetObjectPermissions(sp, sog, false);
1234 if((perms & (uint)PermissionMask.Copy) == 0) 1233 if((perms & (uint)PermissionMask.Copy) == 0)
1235 return false; 1234 return false;
1236 1235
1237 if(sog.OwnerID != userID && sog.OwnerID != sog.GroupID && (perms & (uint)PermissionMask.Transfer) == 0) 1236 if(sog.OwnerID != sp.UUID && sog.OwnerID != sog.GroupID && (perms & (uint)PermissionMask.Transfer) == 0)
1238 return false; 1237 return false;
1239 1238
1240 //If they can rez, they can duplicate 1239 //If they can rez, they can duplicate
1241 return CanRezObject(objectCount, userID, objectPosition, scene); 1240 return CanRezObject(0, sp.UUID, sog.AbsolutePosition, scene);
1242 } 1241 }
1243 1242
1244 private bool CanDeleteObject(UUID objectID, UUID userID, Scene scene) 1243 private bool CanDeleteObject(UUID objectID, UUID userID, Scene scene)