aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/ILandObject.cs1
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs33
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs12
-rwxr-xr-xbin/OpenSim.ini.example9
-rw-r--r--bin/OpenSimDefaults.ini8
5 files changed, 47 insertions, 16 deletions
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index dd73b3f..4f98d7b 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -71,6 +71,7 @@ namespace OpenSim.Framework
71 bool IsEitherBannedOrRestricted(UUID avatar); 71 bool IsEitherBannedOrRestricted(UUID avatar);
72 bool IsBannedFromLand(UUID avatar); 72 bool IsBannedFromLand(UUID avatar);
73 bool IsRestrictedFromLand(UUID avatar); 73 bool IsRestrictedFromLand(UUID avatar);
74 bool IsInLandAccessList(UUID avatar);
74 void SendLandUpdateToClient(IClientAPI remote_client); 75 void SendLandUpdateToClient(IClientAPI remote_client);
75 void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client); 76 void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
76 List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag); 77 List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index cc42f7f..a0ed5a5 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -448,8 +448,6 @@ namespace OpenSim.Region.CoreModules.World.Land
448 448
449 public bool IsRestrictedFromLand(UUID avatar) 449 public bool IsRestrictedFromLand(UUID avatar)
450 { 450 {
451 ExpireAccessList();
452
453 if (m_scene.Permissions.IsAdministrator(avatar)) 451 if (m_scene.Permissions.IsAdministrator(avatar))
454 return false; 452 return false;
455 453
@@ -459,20 +457,27 @@ namespace OpenSim.Region.CoreModules.World.Land
459 if (avatar == LandData.OwnerID) 457 if (avatar == LandData.OwnerID)
460 return false; 458 return false;
461 459
462 if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) > 0) 460 if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) == 0)
461 return false;
462
463 return (!IsInLandAccessList(avatar));
464 }
465
466 public bool IsInLandAccessList(UUID avatar)
467 {
468 ExpireAccessList();
469
470 if (LandData.ParcelAccessList.FindIndex(
471 delegate(LandAccessEntry e)
472 {
473 if (e.AgentID == avatar && e.Flags == AccessList.Access)
474 return true;
475 return false;
476 }) == -1)
463 { 477 {
464 if (LandData.ParcelAccessList.FindIndex( 478 return false;
465 delegate(LandAccessEntry e)
466 {
467 if (e.AgentID == avatar && e.Flags == AccessList.Access)
468 return true;
469 return false;
470 }) == -1)
471 {
472 return true;
473 }
474 } 479 }
475 return false; 480 return true;
476 } 481 }
477 482
478 public void SendLandUpdateToClient(IClientAPI remote_client) 483 public void SendLandUpdateToClient(IClientAPI remote_client)
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 7023984..cd5ed23 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -94,7 +94,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
94 private bool m_RegionOwnerIsGod = false; 94 private bool m_RegionOwnerIsGod = false;
95 private bool m_RegionManagerIsGod = false; 95 private bool m_RegionManagerIsGod = false;
96 private bool m_ParcelOwnerIsGod = false; 96 private bool m_ParcelOwnerIsGod = false;
97 97
98 private bool m_SimpleBuildPermissions = false;
99
98 /// <value> 100 /// <value>
99 /// The set of users that are allowed to create scripts. This is only active if permissions are not being 101 /// The set of users that are allowed to create scripts. This is only active if permissions are not being
100 /// bypassed. This overrides normal permissions. 102 /// bypassed. This overrides normal permissions.
@@ -139,7 +141,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
139 m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true); 141 m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
140 m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false); 142 m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false);
141 m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true); 143 m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
142 144
145 m_SimpleBuildPermissions = myConfig.GetBoolean("simple_build_permissions", false);
146
143 m_allowedScriptCreators 147 m_allowedScriptCreators
144 = ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators); 148 = ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators);
145 m_allowedScriptEditors 149 m_allowedScriptEditors
@@ -824,6 +828,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
824 permission = true; 828 permission = true;
825 } 829 }
826 830
831 if (m_SimpleBuildPermissions &&
832 (parcel.LandData.Flags & (uint)ParcelFlags.UseAccessList) == 0 && parcel.IsInLandAccessList(user))
833 permission = true;
834
827 return permission; 835 return permission;
828 } 836 }
829 837
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index cec7bf0..b770789 100755
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -194,6 +194,15 @@
194 ; region_manager_is_god = false 194 ; region_manager_is_god = false
195 ; parcel_owner_is_god = true 195 ; parcel_owner_is_god = true
196 196
197 ;; More control over permissions
198 ;; This is definitely not SL!
199 ; Provides a simple control for land owners to give build rights to specific avatars
200 ; in publicly accessible parcels that disallow object creation in general.
201 ; Owners specific avatars by adding them to the Access List of the parcel
202 ; without having to use the Groups feature
203 ; simple_build_permissions = false
204
205
197 ;; Default script engine to use. Currently, we only have XEngine 206 ;; Default script engine to use. Currently, we only have XEngine
198 ; DefaultScriptEngine = "XEngine" 207 ; DefaultScriptEngine = "XEngine"
199 208
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index fd31131..3470b82 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -260,6 +260,14 @@
260 ; Default value is all 260 ; Default value is all
261 ; allowed_script_editors = all 261 ; allowed_script_editors = all
262 262
263 ; Provides a simple control for land owners to give build rights to specific avatars
264 ; in publicly accessible parcels that disallow object creation in general.
265 ; Owners specific avatars by adding them to the Access List of the parcel
266 ; without having to use the Groups feature
267 ; Disabled by default
268 ; simple_build_permissions = False
269
270
263 ; ## 271 ; ##
264 ; ## SCRIPT ENGINE 272 ; ## SCRIPT ENGINE
265 ; ## 273 ; ##