aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-30 15:38:42 +0000
committerMelanie Thielker2009-07-30 15:38:42 +0000
commit22a533b675b0f7c1015c3baafb56d0eab145b795 (patch)
tree75a87dab68143946f559e7d4f8c1ce845bdbd283 /OpenSim/Region/CoreModules
parentadding documentation for DisableUndergroundMovement (diff)
downloadopensim-SC_OLD-22a533b675b0f7c1015c3baafb56d0eab145b795.zip
opensim-SC_OLD-22a533b675b0f7c1015c3baafb56d0eab145b795.tar.gz
opensim-SC_OLD-22a533b675b0f7c1015c3baafb56d0eab145b795.tar.bz2
opensim-SC_OLD-22a533b675b0f7c1015c3baafb56d0eab145b795.tar.xz
Thank you, dmiles, for a patch that allows more differentiated script
permissions for YP scripts.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs33
1 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 5c0d3db..a4793e6 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
142 private Dictionary<string, bool> GrantCS = new Dictionary<string, bool>(); 142 private Dictionary<string, bool> GrantCS = new Dictionary<string, bool>();
143 private Dictionary<string, bool> GrantVB = new Dictionary<string, bool>(); 143 private Dictionary<string, bool> GrantVB = new Dictionary<string, bool>();
144 private Dictionary<string, bool> GrantJS = new Dictionary<string, bool>(); 144 private Dictionary<string, bool> GrantJS = new Dictionary<string, bool>();
145 145 private Dictionary<string, bool> GrantYP = new Dictionary<string, bool>();
146 #endregion 146 #endregion
147 147
148 #region IRegionModule Members 148 #region IRegionModule Members
@@ -267,14 +267,26 @@ namespace OpenSim.Region.CoreModules.World.Permissions
267 } 267 }
268 } 268 }
269 269
270 grant = myConfig.GetString("GrantJS",""); 270 grant = myConfig.GetString("GrantJS", "");
271 if (grant.Length > 0) { 271 if (grant.Length > 0)
272 foreach (string uuidl in grant.Split(',')) { 272 {
273 foreach (string uuidl in grant.Split(','))
274 {
273 string uuid = uuidl.Trim(" \t".ToCharArray()); 275 string uuid = uuidl.Trim(" \t".ToCharArray());
274 GrantJS.Add(uuid, true); 276 GrantJS.Add(uuid, true);
275 } 277 }
276 } 278 }
277 279
280 grant = myConfig.GetString("GrantYP", "");
281 if (grant.Length > 0)
282 {
283 foreach (string uuidl in grant.Split(','))
284 {
285 string uuid = uuidl.Trim(" \t".ToCharArray());
286 GrantYP.Add(uuid, true);
287 }
288 }
289
278 } 290 }
279 291
280 public void HandleBypassPermissions(string module, string[] args) 292 public void HandleBypassPermissions(string module, string[] args)
@@ -1784,8 +1796,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1784 } 1796 }
1785 break; 1797 break;
1786 case 3: 1798 case 3:
1787 if (GrantJS.Count == 0 || GrantJS.ContainsKey(ownerUUID.ToString())) { 1799 if (GrantJS.Count == 0 || GrantJS.ContainsKey(ownerUUID.ToString()))
1788 return(true); 1800 {
1801 return (true);
1802 }
1803 break;
1804 case 4:
1805 if (GrantYP.Count == 0 || GrantYP.ContainsKey(ownerUUID.ToString()))
1806 {
1807 return (true);
1789 } 1808 }
1790 break; 1809 break;
1791 } 1810 }