diff options
author | Justin Clark-Casey (justincc) | 2010-04-19 21:02:36 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-05-26 21:12:56 +0100 |
commit | d6e1333810b41407378a534a720128b498e0aada (patch) | |
tree | fa3cd62cc573cbffb41fb5ccff37e22c65c464d7 /OpenSim/Region/CoreModules | |
parent | check group membership and powers with the groups module rather than just the... (diff) | |
download | opensim-SC-d6e1333810b41407378a534a720128b498e0aada.zip opensim-SC-d6e1333810b41407378a534a720128b498e0aada.tar.gz opensim-SC-d6e1333810b41407378a534a720128b498e0aada.tar.bz2 opensim-SC-d6e1333810b41407378a534a720128b498e0aada.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')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 17 |
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 db900df..a972ca6 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1063,7 +1063,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1063 | 1063 | ||
1064 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) | 1064 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) |
1065 | return false; | 1065 | return false; |
1066 | } else { | 1066 | } |
1067 | else | ||
1068 | { | ||
1067 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 1069 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
1068 | return false; | 1070 | return false; |
1069 | } | 1071 | } |
@@ -1079,7 +1081,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1079 | return false; | 1081 | return false; |
1080 | 1082 | ||
1081 | if (!IsGroupMember(ti.GroupID, user, 0)) | 1083 | if (!IsGroupMember(ti.GroupID, user, 0)) |
1082 | return false; | 1084 | return false; |
1083 | } | 1085 | } |
1084 | 1086 | ||
1085 | // Require full perms | 1087 | // Require full perms |
@@ -1483,14 +1485,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1483 | if (part.OwnerID != user) | 1485 | if (part.OwnerID != user) |
1484 | { | 1486 | { |
1485 | if (part.GroupID == UUID.Zero) | 1487 | if (part.GroupID == UUID.Zero) |
1486 | return false; | 1488 | return false; |
1487 | 1489 | ||
1488 | if (!IsGroupMember(part.GroupID, user, 0)) | 1490 | if (!IsGroupMember(part.GroupID, user, 0)) |
1489 | return false; | 1491 | return false; |
1490 | 1492 | ||
1491 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) | 1493 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) |
1492 | return false; | 1494 | return false; |
1493 | } else { | 1495 | } |
1496 | else | ||
1497 | { | ||
1494 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 1498 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
1495 | return false; | 1499 | return false; |
1496 | } | 1500 | } |
@@ -1806,7 +1810,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1806 | // Is it correct to be less restrictive for lists of objects to be returned? | 1810 | // Is it correct to be less restrictive for lists of objects to be returned? |
1807 | } | 1811 | } |
1808 | 1812 | ||
1809 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) { | 1813 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) |
1814 | { | ||
1810 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); | 1815 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); |
1811 | switch (scriptType) { | 1816 | switch (scriptType) { |
1812 | case 0: | 1817 | case 0: |
@@ -1840,4 +1845,4 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1840 | return(false); | 1845 | return(false); |
1841 | } | 1846 | } |
1842 | } | 1847 | } |
1843 | } | 1848 | } \ No newline at end of file |