diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 30 |
2 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 06b1b00..2a590f1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -263,9 +263,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
263 | 263 | ||
264 | public virtual void OnChatBroadcast(Object sender, OSChatMessage c) | 264 | public virtual void OnChatBroadcast(Object sender, OSChatMessage c) |
265 | { | 265 | { |
266 | // unless the chat to be broadcast is of type Region, we | 266 | if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; |
267 | // drop it if its channel is neither 0 nor DEBUG_CHANNEL | ||
268 | if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL && c.Type != ChatTypeEnum.Region) return; | ||
269 | 267 | ||
270 | ChatTypeEnum cType = c.Type; | 268 | ChatTypeEnum cType = c.Type; |
271 | if (c.Channel == DEBUG_CHANNEL) | 269 | if (c.Channel == DEBUG_CHANNEL) |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index ecfd211..289741f 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
238 | m_scene.Permissions.OnEditNotecard += CanEditNotecard; //NOT YET IMPLEMENTED | 238 | m_scene.Permissions.OnEditNotecard += CanEditNotecard; //NOT YET IMPLEMENTED |
239 | m_scene.Permissions.OnEditScript += CanEditScript; //NOT YET IMPLEMENTED | 239 | m_scene.Permissions.OnEditScript += CanEditScript; //NOT YET IMPLEMENTED |
240 | 240 | ||
241 | m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; //NOT IMPLEMENTED HERE | 241 | m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; |
242 | m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED | 242 | m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED |
243 | m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; //NOT YET IMPLEMENTED | 243 | m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; //NOT YET IMPLEMENTED |
244 | m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; //NOT YET IMPLEMENTED | 244 | m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; //NOT YET IMPLEMENTED |
@@ -1780,10 +1780,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1780 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1780 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1781 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1781 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1782 | 1782 | ||
1783 | if ((int)InventoryType.LSL == invType) | 1783 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
1784 | if (m_allowedScriptCreators == UserSet.Administrators && !IsAdministrator(userID)) | 1784 | ScenePresence p = m_scene.GetScenePresence(userID); |
1785 | return false; | 1785 | |
1786 | 1786 | if (part == null || p == null) | |
1787 | return false; | ||
1788 | |||
1789 | if (!IsAdministrator(userID)) | ||
1790 | { | ||
1791 | if (part.OwnerID != userID) | ||
1792 | { | ||
1793 | // Group permissions | ||
1794 | if ((part.GroupID == UUID.Zero) || (p.ControllingClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0)) | ||
1795 | return false; | ||
1796 | } else { | ||
1797 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | ||
1798 | return false; | ||
1799 | } | ||
1800 | if ((int)InventoryType.LSL == invType) | ||
1801 | if (m_allowedScriptCreators == UserSet.Administrators) | ||
1802 | return false; | ||
1803 | } | ||
1804 | |||
1787 | return true; | 1805 | return true; |
1788 | } | 1806 | } |
1789 | 1807 | ||
@@ -1980,4 +1998,4 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1980 | return false; | 1998 | return false; |
1981 | } | 1999 | } |
1982 | } | 2000 | } |
1983 | } \ No newline at end of file | 2001 | } |