diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 2344e96..3a690af 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -251,6 +251,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
251 | m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED | 251 | m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED |
252 | 252 | ||
253 | m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; | 253 | m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; |
254 | m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; | ||
254 | 255 | ||
255 | m_scene.AddCommand(this, "bypass permissions", | 256 | m_scene.AddCommand(this, "bypass permissions", |
256 | "bypass permissions <true / false>", | 257 | "bypass permissions <true / false>", |
@@ -1915,7 +1916,25 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1915 | return true; | 1916 | return true; |
1916 | 1917 | ||
1917 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); | 1918 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); |
1918 | } | 1919 | } |
1920 | |||
1921 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) | ||
1922 | { | ||
1923 | if (null == m_moapModule) | ||
1924 | return false; | ||
1925 | |||
1926 | SceneObjectPart part = m_scene.GetSceneObjectPart(primID); | ||
1927 | if (null == part) | ||
1928 | return false; | ||
1929 | |||
1930 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); | ||
1931 | |||
1932 | // If there is no existing media entry then it can be controlled (in this context, created). | ||
1933 | if (null == me) | ||
1934 | return true; | ||
1935 | |||
1936 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); | ||
1937 | } | ||
1919 | 1938 | ||
1920 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) | 1939 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) |
1921 | { | 1940 | { |