Merge branch 'master' into httptests

httptests
UbitUmarov 2017-01-08 02:00:24 +00:00
commit 45695ef2e3
3 changed files with 24 additions and 11 deletions

View File

@ -6120,7 +6120,7 @@ namespace OpenSim.Region.Framework.Scenes
string reason; string reason;
// dont mess with gods // dont mess with gods
if(IsViewerUIGod || m_scene.Permissions.IsGod(m_uuid)) if(IsGod)
return true; return true;
// respect region owner and managers // respect region owner and managers

View File

@ -310,7 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
foreach (string id in ids) foreach (string id in ids)
{ {
string current = id.Trim(); string current = id.Trim();
if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "GOD" || current.ToUpper() == "GRID_GOD") if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "ACTIVE_GOD" || current.ToUpper() == "GRID_GOD" || current.ToUpper() == "GOD")
{ {
if (!perms.AllowedOwnerClasses.Contains(current)) if (!perms.AllowedOwnerClasses.Contains(current))
perms.AllowedOwnerClasses.Add(current.ToUpper()); perms.AllowedOwnerClasses.Add(current.ToUpper());
@ -415,14 +415,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
//Only gods may use the function
if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD"))
{
if (World.Permissions.IsGod(ownerID))
{
return String.Empty;
}
}
//Only grid gods may use the function //Only grid gods may use the function
if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD"))
@ -433,6 +425,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
//Any god may use the function
if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD"))
{
if (World.Permissions.IsAdministrator(ownerID))
{
return String.Empty;
}
}
//Only active gods may use the function
if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("ACTIVE_GOD"))
{
ScenePresence sp = World.GetScenePresence(ownerID);
if (sp != null && !sp.IsDeleted && sp.IsGod)
{
return String.Empty;
}
}
if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID))
return( 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.", 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.",

View File

@ -38,7 +38,8 @@
; against the owner of the object containing the script. ; against the owner of the object containing the script.
; The comma separated entries in the list may be one of: ; The comma separated entries in the list may be one of:
; "GRID_GOD" -- enable for users with UserLevel >= 200 ; "GRID_GOD" -- enable for users with UserLevel >= 200
; "GOD" -- enable for users with any type of god rights ; "GOD" -- enable for users with rights to be god (local or grid)
; "ACTIVE_GOD" -- enable for users that are present and with active god power
; "ESTATE_MANAGER" -- enable for estate manager ; "ESTATE_MANAGER" -- enable for estate manager
; "ESTATE_OWNER" -- enable for estate owner ; "ESTATE_OWNER" -- enable for estate owner
; "PARCEL_OWNER" -- enable for parcel owner ; "PARCEL_OWNER" -- enable for parcel owner