aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-13 20:29:41 +0000
committerJustin Clarke Casey2008-11-13 20:29:41 +0000
commitbd61b946df3b0589b03b23780a0eb3883268220d (patch)
treec1ea479c95d83b2a11e537761e3cf4b5207b3320 /OpenSim/Region/Environment/Modules
parent* refactor: rename object inventory permission checks to distinguish between ... (diff)
downloadopensim-SC-bd61b946df3b0589b03b23780a0eb3883268220d.zip
opensim-SC-bd61b946df3b0589b03b23780a0eb3883268220d.tar.gz
opensim-SC-bd61b946df3b0589b03b23780a0eb3883268220d.tar.bz2
opensim-SC-bd61b946df3b0589b03b23780a0eb3883268220d.tar.xz
* Add
public bool ExternalChecksCanCreateAvatarInventory(int invType, UUID userID) public bool ExternalChecksCanCopyAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanCopyAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanDeleteAvatarInventory(UUID itemID, UUID userID) to ExternalChecks to handle avatar inventory checks (as opposed to object inv checks). * opensim-dev e-mail to follow concerning this shortly
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs68
1 files changed, 64 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index 394690c..8ecea9e 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -186,7 +186,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
186 m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED 186 m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED
187 m_scene.ExternalChecks.addCheckCanCopyObjectInventory(CanCopyObjectInventory); //NOT YET IMPLEMENTED 187 m_scene.ExternalChecks.addCheckCanCopyObjectInventory(CanCopyObjectInventory); //NOT YET IMPLEMENTED
188 m_scene.ExternalChecks.addCheckCanDeleteObjectInventory(CanDeleteObjectInventory); //NOT YET IMPLEMENTED 188 m_scene.ExternalChecks.addCheckCanDeleteObjectInventory(CanDeleteObjectInventory); //NOT YET IMPLEMENTED
189 m_scene.ExternalChecks.addCheckCanCreateObjectInventory(CanCreateObjectInventory); //NOT YET IMPLEMENTED 189 m_scene.ExternalChecks.addCheckCanCreateAvatarInventory(CanCreateAvatarInventory); //NOT YET IMPLEMENTED
190 m_scene.ExternalChecks.addCheckCanCopyAvatarInventory(CanCopyAvatarInventory); //NOT YET IMPLEMENTED
191 m_scene.ExternalChecks.addCheckCanEditAvatarInventory(CanEditAvatarInventory); //NOT YET IMPLEMENTED
192 m_scene.ExternalChecks.addCheckCanDeleteAvatarInventory(CanDeleteAvatarInventory); //NOT YET IMPLEMENTED
190 m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED 193 m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED
191 194
192 //Register Debug Commands 195 //Register Debug Commands
@@ -1219,8 +1222,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
1219 1222
1220 /// <summary> 1223 /// <summary>
1221 /// Check whether the specified user is allowed to directly create the given inventory type in a prim's 1224 /// Check whether the specified user is allowed to directly create the given inventory type in a prim's
1222 /// inventory (e.g. the New Script button in the 1.21 Linden Lab client). This permission check does not 1225 /// inventory (e.g. the New Script button in the 1.21 Linden Lab client).
1223 /// apply to existing items that are being dragged in to that prim's inventory.
1224 /// </summary> 1226 /// </summary>
1225 /// <param name="invType"></param> 1227 /// <param name="invType"></param>
1226 /// <param name="objectID"></param> 1228 /// <param name="objectID"></param>
@@ -1228,13 +1230,71 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
1228 /// <returns></returns> 1230 /// <returns></returns>
1229 public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID) 1231 public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID)
1230 { 1232 {
1231 m_log.Debug("[PERMISSIONS]: CanCreateInventory called"); 1233 //m_log.Debug("[PERMISSIONS]: CanCreateObjectInventory called");
1232 1234
1233 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1235 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1234 if (m_bypassPermissions) return m_bypassPermissionsValue; 1236 if (m_bypassPermissions) return m_bypassPermissionsValue;
1235 1237
1236 return true; 1238 return true;
1237 } 1239 }
1240
1241 /// <summary>
1242 /// Check whether the specified user is allowed to create the given inventory type in their inventory.
1243 /// </summary>
1244 /// <param name="invType"></param>
1245 /// <param name="userID"></param>
1246 /// <returns></returns>
1247 public bool CanCreateAvatarInventory(int invType, UUID userID)
1248 {
1249 //m_log.Debug("[PERMISSIONS]: CanCreateAvatarInventory called");
1250
1251 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1252 if (m_bypassPermissions) return m_bypassPermissionsValue;
1253
1254 return true;
1255 }
1256
1257 /// <summary>
1258 /// Check whether the specified user is allowed to copy the given inventory type in their inventory.
1259 /// </summary>
1260 /// <param name="itemID"></param>
1261 /// <param name="userID"></param>
1262 /// <returns></returns>
1263 public bool CanCopyAvatarInventory(UUID itemID, UUID userID)
1264 {
1265 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1266 if (m_bypassPermissions) return m_bypassPermissionsValue;
1267
1268 return true;
1269 }
1270
1271 /// <summary>
1272 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1273 /// </summary>
1274 /// <param name="itemID"></param>
1275 /// <param name="userID"></param>
1276 /// <returns></returns>
1277 public bool CanEditAvatarInventory(UUID itemID, UUID userID)
1278 {
1279 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1280 if (m_bypassPermissions) return m_bypassPermissionsValue;
1281
1282 return true;
1283 }
1284
1285 /// <summary>
1286 /// Check whether the specified user is allowed to delete the given inventory item from their own inventory.
1287 /// </summary>
1288 /// <param name="itemID"></param>
1289 /// <param name="userID"></param>
1290 /// <returns></returns>
1291 public bool CanDeleteAvatarInventory(UUID itemID, UUID userID)
1292 {
1293 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1294 if (m_bypassPermissions) return m_bypassPermissionsValue;
1295
1296 return true;
1297 }
1238 1298
1239 public bool CanTeleport(UUID userID) 1299 public bool CanTeleport(UUID userID)
1240 { 1300 {