mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
If a transfer request is received for a task inventory item asset, then route the permissions request through the existing CanEditScript() and CanEditNotecard() methods.
This implements the 'share with group' flag for notecards and scripts in prim inventory since the PermissionsModule checks group membership and permissions. Other than that, the code in PermissionsModule duplicates the checks in LLClientView so there should be no change other than allowing group members to edit embedded notecards and scripts. For all other asset types, the permission checking code in LLClientView continues to be used, pending refactoring of suitable permissions code This means that 'share with group' will not yet work for prim inventory items other than notecards and scripts
This commit is contained in:
@@ -1079,7 +1079,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
|
||||
if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return false;
|
||||
}
|
||||
@@ -1095,7 +1097,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
return false;
|
||||
|
||||
if (!IsGroupMember(ti.GroupID, user, 0))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Require full perms
|
||||
@@ -1593,14 +1595,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
if (part.OwnerID != user)
|
||||
{
|
||||
if (part.GroupID == UUID.Zero)
|
||||
return false;
|
||||
return false;
|
||||
|
||||
if (!IsGroupMember(part.GroupID, user, 0))
|
||||
return false;
|
||||
|
||||
if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return false;
|
||||
}
|
||||
@@ -1855,7 +1859,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
return GenericObjectPermission(agentID, prim, false);
|
||||
}
|
||||
|
||||
private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) {
|
||||
private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene)
|
||||
{
|
||||
//m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType);
|
||||
switch (scriptType) {
|
||||
case 0:
|
||||
@@ -1889,4 +1894,4 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user