OpenSimulator:Permissions

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Updated LLObject-> Primitive)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
In the client, if you enable "Client | Debug Permissions" you will see the object permissions on the "General" tab on edit object.
 
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:
+
The ObjectFlags is defined in libopenmetaverse in the file Primitive.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
 
  public enum ObjectFlags : uint
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
 
  }
 
  }
  
Also, in libsecondlife is Permissions.cs and the PermissionMask is defined there and used in OpenSim like this:
+
Also, in libopenmetaverse is Permissions.cs and the PermissionMask is defined there and used in OpenSim like this:
  
 
  public enum PermissionMask : uint
 
  public enum PermissionMask : uint
 
  {
 
  {
        None = 0;
+
    None       = 0;
     Transfer = 1 << 13, //0x00002000
+
     Transfer   = 1 << 13, //0x00002000
     Modify   = 1 << 14, //0x00004000
+
     Modify     = 1 << 14, //0x00004000
     Copy     = 1 << 15, //0x00008000
+
     Copy       = 1 << 15, //0x00008000
  EnterParcel = 1 << 16, //0x00010000
+
  // Obsolete
  Terraform  = 1 << 17, //0x00020000
+
// EnterParcel = 1 << 16, //0x00010000
  OwnerDebit  = 1 << 18, //0x00040000
+
  // Obsolete
Move        = 1 << 19, //0x00080000
+
// Terraform  = 1 << 17, //0x00020000
Damage      = 1 << 20, //0x00100000
+
  // Obsolete
All        = 0x7FFFFFFF
+
// OwnerDebit  = 1 << 18, //0x00040000
 +
    Move        = 1 << 19, //0x00080000
 +
    Damage      = 1 << 20, //0x00100000
 +
    All        = 0x7FFFFFFF
 
  }
 
  }
  
Line 35: Line 38:
  
 
= BaseMask (B) =
 
= BaseMask (B) =
Default: FULL_MASK_PERMISSIONS_OWNER
+
Default: PermissionMask.All
  
 
This represents the highest amount of permissions a user can have on the object as owner.  
 
This represents the highest amount of permissions a user can have on the object as owner.  
Line 42: Line 45:
  
 
= OwnerMask (O) =
 
= OwnerMask (O) =
Default: PermissionMask.All
+
Default: PermissionMask.All;
  
 
These are the current owner's permissions on the object.
 
These are the current owner's permissions on the object.
Line 57: Line 60:
  
 
= NextOwnerMask (N) =  
 
= NextOwnerMask (N) =  
Default: OBJNEXT_OWNER;
+
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.
 
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.
Line 64: Line 67:
 
''(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.''
 
''(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)
+
Default: Primitive.ObjectFlags.None (0)
  
 
BOGEN permissions are  
 
BOGEN permissions are  
Line 80: Line 83:
  
 
If 'Move' is off, and 'Modify' is on, the object is 'Locked'.
 
If 'Move' is off, and 'Modify' is on, the object is 'Locked'.
 +
 +
[[Category:Development]]

Latest revision as of 08:07, 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 libopenmetaverse in the file Primitive.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 libopenmetaverse 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
// Obsolete
// EnterParcel = 1 << 16, //0x00010000
// Obsolete
// Terraform   = 1 << 17, //0x00020000
// Obsolete
// 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

[edit] 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.

[edit] OwnerMask (O)

Default: PermissionMask.All;

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

[edit] GroupMask (G)

Default: PermissionMask.None;

[edit] 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.

[edit] 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.

[edit] 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: Primitive.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