factor out soon to be common media permissions check code
parent
51b208e96c
commit
a9101feb10
|
@ -1914,19 +1914,24 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
if (null == me)
|
if (null == me)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
return GenericPrimMediaPermission(part, agentID, me.ControlPermissions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms)
|
||||||
|
{
|
||||||
if (IsAdministrator(agentID))
|
if (IsAdministrator(agentID))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((me.ControlPermissions & MediaPermission.Anyone) == MediaPermission.Anyone)
|
if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((me.ControlPermissions & MediaPermission.Owner) == MediaPermission.Owner)
|
if ((perms & MediaPermission.Owner) == MediaPermission.Owner)
|
||||||
{
|
{
|
||||||
if (agentID == part.OwnerID)
|
if (agentID == part.OwnerID)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((me.ControlPermissions & MediaPermission.Group) == MediaPermission.Group)
|
if ((perms & MediaPermission.Group) == MediaPermission.Group)
|
||||||
{
|
{
|
||||||
if (IsGroupMember(part.GroupID, agentID, 0))
|
if (IsGroupMember(part.GroupID, agentID, 0))
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue