*Added all the permission checks to the sceneexternalchecks and modified permission module to follow this.

*This makes permission checking much more modular; allows restrictive and granting module to be made without modifying the existing permission module
This commit is contained in:
mingchen
2008-05-08 19:37:57 +00:00
parent 4b924f2eb6
commit 6c71a04da8
11 changed files with 666 additions and 215 deletions

View File

@@ -1245,7 +1245,7 @@ namespace OpenSim.Region.Environment.Scenes
LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false);
if (Permissions.CanRezObject(ownerID, pos, 1))
if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos))
{
// rez ON the ground, not IN the ground
pos.Z += 0.25F;
@@ -2519,7 +2519,7 @@ namespace OpenSim.Region.Environment.Scenes
if (m_scenePresences.ContainsKey(agentID))
{
// First check that this is the sim owner
if (Permissions.GenericEstatePermission(agentID))
if (ExternalChecks.ExternalChecksCanBeGodLike(agentID))
{
// Next we check for spoofing.....
LLUUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId;
@@ -2597,7 +2597,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if (m_scenePresences.ContainsKey(agentID) || agentID == kickUserID)
{
if (Permissions.GenericEstatePermission(godID))
if (ExternalChecks.ExternalChecksCanBeGodLike(godID))
{
if (agentID == kickUserID)
{
@@ -2918,7 +2918,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0)
{
if (part.OwnerID == parcel.landData.ownerID || (parcel.landData.isGroupOwned && part.GroupID == parcel.landData.groupID) || Permissions.GenericEstatePermission(part.OwnerID))
if (part.OwnerID == parcel.landData.ownerID || (parcel.landData.isGroupOwned && part.GroupID == parcel.landData.groupID) || ExternalChecks.ExternalChecksCanBeGodLike(part.OwnerID))
{
return true;
}