aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Permissions
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-19 21:02:36 +0100
committerJustin Clark-Casey (justincc)2010-04-19 21:02:36 +0100
commitda83ee28be93ff2649e1df214d942b01104247de (patch)
tree9419de09d3ce61f92e2ad871543965717badf5da /OpenSim/Region/CoreModules/World/Permissions
parentlog problems when an asset request through the UDP TransferRequest channel go... (diff)
downloadopensim-SC-da83ee28be93ff2649e1df214d942b01104247de.zip
opensim-SC-da83ee28be93ff2649e1df214d942b01104247de.tar.gz
opensim-SC-da83ee28be93ff2649e1df214d942b01104247de.tar.bz2
opensim-SC-da83ee28be93ff2649e1df214d942b01104247de.tar.xz
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
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index d940564..01359f0 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1079,7 +1079,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1079 1079
1080 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) 1080 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
1081 return false; 1081 return false;
1082 } else { 1082 }
1083 else
1084 {
1083 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1085 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1084 return false; 1086 return false;
1085 } 1087 }
@@ -1095,7 +1097,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1095 return false; 1097 return false;
1096 1098
1097 if (!IsGroupMember(ti.GroupID, user, 0)) 1099 if (!IsGroupMember(ti.GroupID, user, 0))
1098 return false; 1100 return false;
1099 } 1101 }
1100 1102
1101 // Require full perms 1103 // Require full perms
@@ -1593,14 +1595,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1593 if (part.OwnerID != user) 1595 if (part.OwnerID != user)
1594 { 1596 {
1595 if (part.GroupID == UUID.Zero) 1597 if (part.GroupID == UUID.Zero)
1596 return false; 1598 return false;
1597 1599
1598 if (!IsGroupMember(part.GroupID, user, 0)) 1600 if (!IsGroupMember(part.GroupID, user, 0))
1599 return false; 1601 return false;
1600 1602
1601 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) 1603 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
1602 return false; 1604 return false;
1603 } else { 1605 }
1606 else
1607 {
1604 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1608 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1605 return false; 1609 return false;
1606 } 1610 }
@@ -1855,7 +1859,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1855 return GenericObjectPermission(agentID, prim, false); 1859 return GenericObjectPermission(agentID, prim, false);
1856 } 1860 }
1857 1861
1858 private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) { 1862 private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene)
1863 {
1859 //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); 1864 //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType);
1860 switch (scriptType) { 1865 switch (scriptType) {
1861 case 0: 1866 case 0:
@@ -1889,4 +1894,4 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1889 return(false); 1894 return(false);
1890 } 1895 }
1891 } 1896 }
1892} 1897} \ No newline at end of file