From 22a533b675b0f7c1015c3baafb56d0eab145b795 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 30 Jul 2009 15:38:42 +0000 Subject: [PATCH] Thank you, dmiles, for a patch that allows more differentiated script permissions for YP scripts. --- .../World/Permissions/PermissionsModule.cs | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 5c0d3db834..a4793e646c 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 private Dictionary GrantCS = new Dictionary(); private Dictionary GrantVB = new Dictionary(); private Dictionary GrantJS = new Dictionary(); - + private Dictionary GrantYP = new Dictionary(); #endregion #region IRegionModule Members @@ -267,14 +267,26 @@ namespace OpenSim.Region.CoreModules.World.Permissions } } - grant = myConfig.GetString("GrantJS",""); - if (grant.Length > 0) { - foreach (string uuidl in grant.Split(',')) { + grant = myConfig.GetString("GrantJS", ""); + if (grant.Length > 0) + { + foreach (string uuidl in grant.Split(',')) + { string uuid = uuidl.Trim(" \t".ToCharArray()); GrantJS.Add(uuid, true); } } - + + grant = myConfig.GetString("GrantYP", ""); + if (grant.Length > 0) + { + foreach (string uuidl in grant.Split(',')) + { + string uuid = uuidl.Trim(" \t".ToCharArray()); + GrantYP.Add(uuid, true); + } + } + } public void HandleBypassPermissions(string module, string[] args) @@ -1784,8 +1796,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions } break; case 3: - if (GrantJS.Count == 0 || GrantJS.ContainsKey(ownerUUID.ToString())) { - return(true); + if (GrantJS.Count == 0 || GrantJS.ContainsKey(ownerUUID.ToString())) + { + return (true); + } + break; + case 4: + if (GrantYP.Count == 0 || GrantYP.ContainsKey(ownerUUID.ToString())) + { + return (true); } break; }