add basic tests to check that under default permissions module owner can delete objects and that non-owners (who are also not administrators, etc.) cannot

This commit is contained in:
Justin Clark-Casey (justincc)
2010-11-22 22:51:26 +00:00
parent d2aebbe066
commit 34b13a4765
4 changed files with 186 additions and 11 deletions

View File

@@ -1733,7 +1733,12 @@ namespace OpenSim.Region.Framework.Scenes
// Autoreturn has a null client. Nothing else does. So
// allow only returns
if (action != DeRezAction.Return)
{
m_log.WarnFormat(
"[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client",
action, grp.Name, grp.UUID);
return;
}
permissionToTakeCopy = false;
}
@@ -1741,13 +1746,13 @@ namespace OpenSim.Region.Framework.Scenes
{
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
permissionToTakeCopy = false;
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
permissionToTake = false;
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
permissionToDelete = false;
}
}
// Handle god perms