From 22a533b675b0f7c1015c3baafb56d0eab145b795 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 30 Jul 2009 15:38:42 +0000 Subject: 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(-) (limited to 'OpenSim/Region/CoreModules/World/Permissions') 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 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; } -- cgit v1.1