mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
* Permissions! - You can now only perform certain functions (such as editing other peoples objects) if you have permission to do so.
* Moved OnPermissionError to EventManager - now triggers a standard blue alert. * Terraforming now requires permission via the permissions manager. [Defaults to admin-only] * Permissions manager is now substantiated in Scene * Buttload of new permissions added. * Estate manager operations now require various levels of permission to operate * OGS1 now produces 'summary reports' for a commsManager of each scene it maintains connections for. Reduces grid network traffic for ping checks. * Added new "permissions true" / "permissions false" console command to enable or disable permissions.
This commit is contained in:
@@ -50,6 +50,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <param name="west">Distance from the west border where the cursor is located</param>
|
||||
public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, IClientAPI remoteUser)
|
||||
{
|
||||
// Do a permissions check before allowing terraforming.
|
||||
// random users are now no longer allowed to terraform
|
||||
// if permissions are enabled.
|
||||
if (!PermissionsMngr.CanTerraform(remoteUser.AgentId, new LLVector3(north, west, 0)))
|
||||
return;
|
||||
|
||||
// Shiny.
|
||||
double size = (double)(1 << brushsize);
|
||||
|
||||
@@ -240,15 +246,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
if (selectedEnt != null)
|
||||
{
|
||||
List<ScenePresence> avatars = this.RequestAvatarList();
|
||||
foreach (ScenePresence avatar in avatars)
|
||||
if (PermissionsMngr.CanDeRezObject(simClient.AgentId, selectedEnt.m_uuid))
|
||||
{
|
||||
avatar.ControllingClient.SendKillObject(this.m_regionHandle, selectedEnt.LocalId);
|
||||
}
|
||||
|
||||
lock (Entities)
|
||||
{
|
||||
Entities.Remove(selectedEnt.m_uuid);
|
||||
List<ScenePresence> avatars = this.RequestAvatarList();
|
||||
foreach (ScenePresence avatar in avatars)
|
||||
{
|
||||
avatar.ControllingClient.SendKillObject(this.m_regionHandle, selectedEnt.LocalId);
|
||||
}
|
||||
|
||||
lock (Entities)
|
||||
{
|
||||
Entities.Remove(selectedEnt.m_uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,16 +510,19 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
||||
{
|
||||
bool hasPrim = false;
|
||||
foreach (EntityBase ent in Entities.Values)
|
||||
if (PermissionsMngr.CanEditObject(remoteClient.AgentId, objectID))
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
bool hasPrim = false;
|
||||
foreach (EntityBase ent in Entities.Values)
|
||||
{
|
||||
hasPrim = ((SceneObjectGroup)ent).HasChildPrim(objectID);
|
||||
if (hasPrim != false)
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
((SceneObjectGroup)ent).GrabMovement(offset, pos, remoteClient);
|
||||
break;
|
||||
hasPrim = ((SceneObjectGroup)ent).HasChildPrim(objectID);
|
||||
if (hasPrim != false)
|
||||
{
|
||||
((SceneObjectGroup)ent).GrabMovement(offset, pos, remoteClient);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user