Skip to content

OpenSim Permissions Tests

Diva Canto edited this page Apr 30, 2017 · 23 revisions

These test scripts target Next Owner permissions Modify (M), Copy (C), and Transfer (T). As such, they all involve an item being transferred at least once, and possibly more, from one avatar to another, either directly or indirectly.

Direct Transfers

A0 creates an item, sets it to a given combination of Next Owner permissions. If it's an object, takes it into inventory. Then drags the item from inventory into another avatar A1. A third avatar A2 is in the scene.

Item: Single object

Box C

  • Assert: Shown permissions of object in A1's inventory are just C, i.e. (no modify)(no transfer)
  • Assert: A1 can rez object inworld and keep it in inventory too
  • Assert: Shown permissions of object for A1 are "you cannot modify this object"
  • Assert: A1 can take a copy of object into inventory
  • Assert: Shown permissions of copy in A1's inventory as just C
  • Assert: A1 can rez the taken copy in world
  • Assert: The new copy inworld is also only C "You cannot modify this object"
  • Assert: A1 can duplicate object inworld
  • Assert: A1 cannot give the object or its copy to A0 or A2
  • Assert: A0 and A2 cannot take a copy of the object

Box CT

  • Assert: Shown permissions of object in A1's inventory are CT (no modify)
  • Assert: A1 can rez object inworld and keep it in inventory too
  • Assert: Shown permissions of object for A1 are "you cannot modify this object"
  • Assert: A1 can take a copy of object into inventory
  • Assert: Shown permissions of copy in A1's inventory as CT
  • Assert: A1 can rez the taken copy in world
  • Assert: The new copy inworld is also CT "You cannot modify this object"
  • Assert: A1 can duplicate object inworld
  • Assert: A1 can give the object and its copy to A0 or A2
  • Assert: A0 and A2 cannot take a copy of the object

Box MC

  • Assert: Shown permissions of object in A1's inventory are MC (no transfer)
  • Assert: A1 can rez object inworld and keep it in inventory too
  • Assert: Shown permissions of object for A1 are "you can modify this object"
  • Assert: A1 can take a copy of object into inventory
  • Assert: Shown permissions of copy in A1's inventory as MC
  • Assert: A1 can rez the taken copy in world
  • Assert: The new copy inworld is also MC "You can modify this object"
  • Assert: A1 can duplicate object inworld
  • Assert: A1 cannot give the object and its copy to A0 or A2
  • Assert: A0 and A2 cannot take a copy of the object

Box MCT

  • Assert: Shown permissions of object in A1's inventory are MCT, no restrictions shown
  • Assert: A1 can rez object inworld and keep it in inventory too
  • Assert: Shown permissions of object for A1 are "you can modify this object"
  • Assert: A1 can take a copy of object into inventory
  • Assert: Shown permissions of copy in A1's inventory as MCT
  • Assert: A1 can rez the taken copy in world
  • Assert: The new copy inworld is also MCT "You can modify this object"
  • Assert: A1 can duplicate object inworld
  • Assert: A1 can give the object and its copy to A0 or A2
  • Assert: A0 and A2 cannot take a copy of the object

Box MT

  • Assert: Shown permissions of object in A1's inventory are MT, (no copy)
  • Assert: A1 can rez object inworld but loses it in inventory
  • Assert: Shown permissions of object for A1 are "you can modify this object"
  • Assert: A1 cannot duplicate object inworld
  • Assert: A0 and A2 cannot take a copy of the object
  • Assert: A1 cannot take a copy of the object into inventory
  • Assert: A1 can take the object into inventory, but it derezzes from inworld
  • Assert: Shown permissions of taken object in A1's inventory as MT
  • Assert: A1 can give the object to A2, but it loses it from inventory
  • Assert: Shown permissions in A2's inventory as MT
  • Assert: A2 can rez the object but it loses it from inventory

Box T

  • Assert: Shown permissions of object in A1's inventory are T, i.e. (no modify)(no copy)
  • Assert: A1 can rez object inworld but loses it in inventory
  • Assert: Shown permissions of object for A1 are "you cannot modify this object"
  • Assert: A1 cannot duplicate object inworld
  • Assert: A0 and A2 cannot take a copy of the object
  • Assert: A1 cannot take a copy of the object into inventory
  • Assert: A1 can take the object into inventory, but it derezzes from inworld
  • Assert: Shown permissions of taken object in A1's inventory as T
  • Assert: A1 can give the object to A2, but it loses it from inventory
  • Assert: Shown permissions in A2's inventory as T
  • Assert: A2 can rez the object but it loses it from inventory

Box MCT -C -M

This test involves 2 transfers with removal of privileges in between, and checks that there are no escalation of privileges at the end. Avatar A0 starts with a MCT box inworld, which is then taken to and edited in inventory, removing the Copy permission (-C). A0 gives the object to A1.

  • Assert: Shown permissions in A1's inventory are MT (no copy)

Edit the object in A1's inventory, removing the Modify permission (-M). Give it to A2.

  • Assert: A1 loses the object (because it is no copy)
  • Assert: Shown permissions on A2's inventory are T (no copy)(no modify)

Edit object's properties in A2's inventory.

  • Assert: A2 has no right to change Next Owner permissions

Item: Multi-part object

Item: Container object

Item: Wearable

Item: Script

Inworld Transfers

Simple Container Box

A0 creates a container box, MCT, and places another MCT box inside. Then sets the container box as "Anyone can copy." But the inside box does not have "Anyone can copy" checked. A1 right clicks to take copy.

  • Assert: A1 does not see Take Copy as option

Do the same thing, but now the inside box also has "Anyone can copy" permission.

  • Assert: A1 sees Take Copy as option

Indirect Transfers

All these tests involve an intermediary seller object of some sort.

Seller of MT Object, with Additional Transfer

A0 creates a full perms Box MCT, takes it to inventory, edits the object in inventory and removes the Copy permission, making it an MT Box. Then creates a seller object, places this MT Box inside, and sets the contents of the seller box for sale. A1 clicks the seller to buy the content.

  • Assert: Box MT in A1's inventory is MT (no copy)

A1 then gives this MT Box to A2 directly (no seller).

  • Assert: The box is deleted from A1's inventory
  • Assert: The MT Box in A2's inventory is MT (no copy)

2-Seller Chain with Change in Permissions

A0 creates a full perms Box MCT, takes it to inventory. Then creates another box (Seller), places the first box inside this one, and puts the contents for sale. A1 clicks the seller to buy the content.

  • Assert: Box MCT in A1's inventory is MCT

A1 then edits the received box in inventory and removes the Copy permission, making it a MT Box. Then creates another box, a seller, places this MT Box inside, and puts the contents for sale. A2 clicks this seller to buy the content.

  • Assert: Box MT in A2's inventory is MT (no copy)

llGiveInventory

A0 creates a box with this script inside, and adds boxes of several permissions inside. A1 clicks this object.

  • Assert: Objects received by A1 honor the permissions set by A0.

Object Inventory

Remove rights of item inside object inventory

A0 creates a box T, places an MCT box inside. In object inventory, edit the properties of the inside box and remove the C permission. Set the outside box to "Everyone can Copy." A1 takes copy. Also, A0 gives the container box to A1. In both cases:

  • Assert: the inside object is MT (no copy)
  • Assert: the container box is T (no copy)(no modify)

Remove rights of item inside seller object inventory

A0 creates a box T, places an MCT box inside. In object inventory, edit the properties of the inside box and remove the C permission. Set the outside box to "sell contents." A1 clicks the seller to buy the object.

  • Assert: A1 receives the object
  • Assert: the received object is MT (no copy)