OpenSimulator:Permissions

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Updated masks to reflect source changes)
m (Typo)
Line 12: Line 12:
 
  AllowInventoryDrop = 0x00010000, ObjectTransfer = 0x00020000, ObjectGroupOwned = 0x00040000, ObjectYouOfficer = 0x00080000,
 
  AllowInventoryDrop = 0x00010000, ObjectTransfer = 0x00020000, ObjectGroupOwned = 0x00040000, ObjectYouOfficer = 0x00080000,
 
     CameraDecoupled = 0x00100000,    AnimSource = 0x00200000,    CameraSource = 0x00400000,      CastShadows = 0x00800000,  
 
     CameraDecoupled = 0x00100000,    AnimSource = 0x00200000,    CameraSource = 0x00400000,      CastShadows = 0x00800000,  
   //not defiined yet 0x01000000,                  0x02000000,                    0x04000000,                    0x08000000,
+
   //not defined yet   0x01000000,                  0x02000000,                    0x04000000,                    0x08000000,
 
   ObjectOwnerModify = 0x10000000, TemporaryOnRez = 0x20000000,        Temporary = 0x40000000,  ZlibCompressed = 0x80000000
 
   ObjectOwnerModify = 0x10000000, TemporaryOnRez = 0x20000000,        Temporary = 0x40000000,  ZlibCompressed = 0x80000000
 
  }
 
  }

Revision as of 05:17, 14 February 2010

In the client, if you enable "Client | Debug Permissions" you will see the object permissions on the "General" tab on edit object.

The ObjectFlags is defined in libsecondlife in the file llObject.cs and used extensively within the OpenSim source. ObjectFlags is a 32bit enumerated variable with one or more bit fields set in it and looks like this:

public enum ObjectFlags : uint
{
None = 0,
           Physics = 0x00000001, CreateSelected = 0x00000002,     ObjectModify = 0x00000004,       ObjectCopy = 0x00000008,
    ObjectAnyOwner = 0x00000010, ObjectYouOwner = 0x00000020,         Scripted = 0x00000040,            Touch = 0x00000080,
        ObjectMove = 0x00000100,          Money = 0x00000200,          Phantom = 0x00000400,   InventoryEmpty = 0x00000800,
        JointHinge = 0x00001000,       JointP2P = 0x00002000,        JointLP2P = 0x00004000,       JointWheel = 0x00008000, 
AllowInventoryDrop = 0x00010000, ObjectTransfer = 0x00020000, ObjectGroupOwned = 0x00040000, ObjectYouOfficer = 0x00080000,
   CameraDecoupled = 0x00100000,     AnimSource = 0x00200000,     CameraSource = 0x00400000,      CastShadows = 0x00800000, 
 //not defined yet   0x01000000,                  0x02000000,                    0x04000000,                    0x08000000,
 ObjectOwnerModify = 0x10000000, TemporaryOnRez = 0x20000000,        Temporary = 0x40000000,   ZlibCompressed = 0x80000000
}

Also, in libsecondlife is Permissions.cs and the PermissionMask is defined there and used in OpenSim like this:

public enum PermissionMask : uint
{
       None = 0;
   Transfer = 1 << 13, //0x00002000
   Modify   = 1 << 14, //0x00004000
   Copy     = 1 << 15, //0x00008000
EnterParcel = 1 << 16, //0x00010000
Terraform   = 1 << 17, //0x00020000
OwnerDebit  = 1 << 18, //0x00040000
Move        = 1 << 19, //0x00080000
Damage      = 1 << 20, //0x00100000
All         = 0x7FFFFFFF
}

Various masks are applied to these bit fields and here is a description of some of these masks and how they relate to the permission masks that can be set on a SceneObjectPart:

Contents

BaseMask (B)

Default: PermissionMask.All

This represents the highest amount of permissions a user can have on the object as owner.

If the previous owner specified that the next owner couldn't transfer the object. On Transfer, the basemask will now be minus transfer permissions. This locks the next owner from being able to add transfer permissions back to an object that someone gave them and specified that nobody could give it away.

OwnerMask (O)

Default: PermissionMask.All;

These are the current owner's permissions on the object.

GroupMask (G)

Default: PermissionMask.None;

EveryoneMask (E)

Default: PermissionMask.None;

These are the permissions that the general public has on the object. This consists of 'Anyone can Move' 'Anyone can Copy' permissions.

This *used* to also contain functionality for 'public' objects in Linden Lab's SecondLife, but this functionality had been removed from the simulator later.

NextOwnerMask (N)

Default: PermissionMask.All;

These are the permissions that the owner sets with the Modify Copy and Transfer checkboxes. These permissions become the BaseMask and the OwnerMask when the object is transferred.

ObjectFlags (F)

(Not a Permission, but applies to permissions because it affects the client's experience of what they can do with an object) Ultimately, client side handling of permissions boils down to the F flags. These get mixed and matched based on the above permissions flags.

Default: LLObject.ObjectFlags.None (0)

BOGEN permissions are V : Move M : Modify C : Copy T : Transfer

The F flags are a bit different; they represent the 'actual' or 'calculated' permissions that are set for the object, basically, this are the 'real' permissions. Although they show as VMCT they come from a different bit field, with the bits in other positions.

The Server ORs the permission flags together, then OR the relevant permission flags into the corresponding ObjectFlags bits(for now).

Apart from the permission flags, ObjectFlags also have flags like 'Physics', 'Phantom' and 'Touch'.

If 'Move' is off, and 'Modify' is on, the object is 'Locked'.

Personal tools
General
About This Wiki