diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index a1c5fe7..c1c1b6e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -171,6 +171,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
171 | 171 | ||
172 | if (item != null) | 172 | if (item != null) |
173 | { | 173 | { |
174 | if ((InventoryType) item.InvType == InventoryType.Notecard) | ||
175 | { | ||
176 | if (!ExternalChecks.ExternalChecksCanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId)) | ||
177 | { | ||
178 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false); | ||
179 | return UUID.Zero; | ||
180 | } | ||
181 | } | ||
182 | else if ((InventoryType) item.InvType == InventoryType.LSL) | ||
183 | { | ||
184 | if (!ExternalChecks.ExternalChecksCanEditScript(itemID, UUID.Zero, remoteClient.AgentId)) | ||
185 | { | ||
186 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false); | ||
187 | return UUID.Zero; | ||
188 | } | ||
189 | } | ||
190 | |||
174 | AssetBase asset = | 191 | AssetBase asset = |
175 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); | 192 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); |
176 | AssetCache.AddAsset(asset); | 193 | AssetCache.AddAsset(asset); |
@@ -179,15 +196,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
179 | userInfo.UpdateItem(item); | 196 | userInfo.UpdateItem(item); |
180 | 197 | ||
181 | // remoteClient.SendInventoryItemCreateUpdate(item); | 198 | // remoteClient.SendInventoryItemCreateUpdate(item); |
182 | if ((InventoryType) item.InvType == InventoryType.Notecard) | ||
183 | { | ||
184 | //do we want to know about updated note cards? | ||
185 | } | ||
186 | else if ((InventoryType) item.InvType == InventoryType.LSL) | ||
187 | { | ||
188 | // do we want to know about updated scripts | ||
189 | } | ||
190 | |||
191 | return (asset.FullID); | 199 | return (asset.FullID); |
192 | } | 200 | } |
193 | } | 201 | } |
@@ -228,6 +236,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
228 | public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, UUID itemId, | 236 | public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, UUID itemId, |
229 | UUID primId, bool isScriptRunning, byte[] data) | 237 | UUID primId, bool isScriptRunning, byte[] data) |
230 | { | 238 | { |
239 | if (!ExternalChecks.ExternalChecksCanEditScript(itemId, primId, remoteClient.AgentId)) | ||
240 | { | ||
241 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false); | ||
242 | return; | ||
243 | } | ||
244 | |||
231 | // Retrieve group | 245 | // Retrieve group |
232 | SceneObjectPart part = GetSceneObjectPart(primId); | 246 | SceneObjectPart part = GetSceneObjectPart(primId); |
233 | SceneObjectGroup group = part.ParentGroup; | 247 | SceneObjectGroup group = part.ParentGroup; |