*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

@@ -32,72 +32,6 @@ namespace OpenSim.Region.Environment.Interfaces
public interface IScenePermissions
{
bool BypassPermissions { get; set; }
#region Object Permissions
bool CanRezObject(LLUUID user, LLVector3 position, int count);
/// <summary>
/// Permissions check - can user delete an object?
/// </summary>
/// <param name="user">User attempting the delete</param>
/// <param name="obj">Target object</param>
/// <returns>Has permission?</returns>
bool CanDeRezObject(LLUUID user, LLUUID obj);
bool CanCopyObject(LLUUID user, LLUUID obj);
bool CanEditObject(LLUUID user, LLUUID obj);
bool CanEditObjectPosition(LLUUID user, LLUUID obj);
/// <summary>
/// Permissions check - can user enter an object?
/// </summary>
/// <param name="user">User attempting move an object</param>
/// <param name="oldPos">Source object-position</param>
/// <param name="newPos">Target object-position</param>
/// <returns>Has permission?</returns>
bool CanObjectEntry(LLUUID user, LLVector3 oldPos, LLVector3 newPos);
bool CanReturnObject(LLUUID user, LLUUID obj);
#endregion
#region Uncategorized permissions
bool CanInstantMessage(LLUUID user, LLUUID target);
bool CanInventoryTransfer(LLUUID user, LLUUID target);
bool CanEditScript(LLUUID user, LLUUID script);
bool CanRunScript(LLUUID user, LLUUID script);
bool CanRunConsoleCommand(LLUUID user);
bool CanTerraform(LLUUID user, LLVector3 position);
#endregion
#region Estate Permissions
bool IsEstateManager(LLUUID user);
bool GenericEstatePermission(LLUUID user);
bool CanEditEstateTerrain(LLUUID user);
bool CanRestartSim(LLUUID user);
bool CanEditParcel(LLUUID user, ILandObject parcel);
bool CanSellParcel(LLUUID user, ILandObject parcel);
bool CanAbandonParcel(LLUUID user, ILandObject parcel);
#endregion
uint GenerateClientFlags(LLUUID user, LLUUID objID);
}
}