Add GRID_GOD to the list of values allowed for enabling OSSL functions

melanie
Melanie Thielker 2016-12-21 14:35:34 +00:00
parent 90be8d78c3
commit 7286b27ff9
1 changed files with 10 additions and 1 deletions

View File

@ -310,7 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
foreach (string id in ids)
{
string current = id.Trim();
if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER")
if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "GRID_GOD")
{
if (!perms.AllowedOwnerClasses.Contains(current))
perms.AllowedOwnerClasses.Add(current.ToUpper());
@ -415,6 +415,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
//Only gods may use the function
if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD"))
{
if (World.Permissions.IsAdministrator(ownerID))
{
return String.Empty;
}
}
if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID))
return(
String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.",