aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2017-01-18 01:16:58 +0000
committerUbitUmarov2017-01-18 01:16:58 +0000
commite96378971455f5bf7969d9ca66c473d2262be7ff (patch)
treefadece4f0dac57da1d49eabe7dcb7a6e7c05ad03 /OpenSim/Region/CoreModules
parentPermissions module: replace some GenericObjectPermission by GenericObjectPerm... (diff)
downloadopensim-SC_OLD-e96378971455f5bf7969d9ca66c473d2262be7ff.zip
opensim-SC_OLD-e96378971455f5bf7969d9ca66c473d2262be7ff.tar.gz
opensim-SC_OLD-e96378971455f5bf7969d9ca66c473d2262be7ff.tar.bz2
opensim-SC_OLD-e96378971455f5bf7969d9ca66c473d2262be7ff.tar.xz
Permissions module: fix in prim inv CanEditNotecard group edit rights check ( in last commit plz read .. by GetObjectPermissions)
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs20
1 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 930f5f2..6e8ca55 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1320,6 +1320,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1320 if (sog == null) 1320 if (sog == null)
1321 return false; 1321 return false;
1322 1322
1323 // check object mod right
1323 uint perms = GetObjectPermissions(user, sog, true); 1324 uint perms = GetObjectPermissions(user, sog, true);
1324 if((perms & (uint)PermissionMask.Modify) == 0) 1325 if((perms & (uint)PermissionMask.Modify) == 0)
1325 return false; 1326 return false;
@@ -1331,14 +1332,27 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1331 TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard); 1332 TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard);
1332 if (ti == null) 1333 if (ti == null)
1333 return false; 1334 return false;
1334 1335
1335 if (ti.OwnerID != user) 1336 if (ti.OwnerID != user)
1336 { 1337 {
1337 if (ti.GroupID == UUID.Zero) 1338 UUID tiGroupID = ti.GroupID;
1339 if (tiGroupID == UUID.Zero)
1338 return false; 1340 return false;
1339 1341
1340 if (!IsGroupMember(ti.GroupID, user, 0)) 1342 ulong powers = 0;
1343 if(!GroupMemberPowers(tiGroupID, user, ref powers))
1341 return false; 1344 return false;
1345
1346 if(tiGroupID == ti.OwnerID && (powers & (ulong)GroupPowers.ObjectManipulate) != 0)
1347 {
1348 if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy)) ==
1349 ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy))
1350 return true;
1351 }
1352 if ((ti.GroupPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy)) ==
1353 ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy))
1354 return true;
1355 return false;
1342 } 1356 }
1343 1357
1344 // Require full perms 1358 // Require full perms