LlGetObjectPermMask Test

From Second Life Wiki
Revision as of 11:30, 6 August 2008 by Dan Linden (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



[LENGTH] 00:30


[OVERVIEW] This test has been designed to test if permissions are transferred correctly between users. It also tests the functionality of the llGetObjectPermMask LSL Function.

[SETUP] This test requires 2 users and rezzable land


[0010] User A: Create 8 simple cubes on the ground, name them "Object1" through "Object8"

[0020] User A: Set the Permissions for each as follows:

[0030] full permissions, shared with group, anyone can copy, anyone can move

[0040] full permissions

[0050] no copy

[0060] no mod

[0070] no copy, no mod

[0080] no mod, no transfer

[0090] no transfer

[0100] full permissions, locked

[0110] User A: Create then Add the script to each item. (unlock the locked box and relock it after)

[SCRIPT] llGetObjectPermMaskScript


[NOTE] Make sure the script is full permissions for the next user: copyable, modable, transferrable !!!


[0130] User A: Take a Copy of each item and give each to User B:

[0140] User A: Leave the items on the ground in a row to make it easier to test all at once.

[0150] User B: Accept all items from User A:

[0160] User B: Rez the items on the ground next to User A's items.

[0170] User B: Close the Edit Window if it is open.

[0180] User B: One at a time, left-click each box to touch it.

[0190] Observe the output for each. Compare the perms reported with the actual perms of the box.

[0200] Verify all permissions reported match up; on failures, indicate which object and which permissions.

[NOTE] (Base permissions are the least restrictive that the object has, owner permissions are what permissions the owner of the object has, group permissions are what permissions the group has, which should only work with shared with group, everyone permissions are what anyone can do, NEXT permissions are what the next owner can do.)



doPermIter(integer perm) 
if(PERM_MOVE & perm) 
llWhisper(0,"moVe: ON"); 
llWhisper(0,"moVe: OFF"); 
if(PERM_MODIFY & perm) 
llWhisper(0,"Modify: ON"); 
llWhisper(0,"Modify: OFF"); 
if(PERM_COPY & perm) 
llWhisper(0,"Copy: ON"); 
llWhisper(0,"Copy: OFF"); 
if(PERM_TRANSFER & perm) 
llWhisper(0,"Transfer: ON"); 
llWhisper(0,"Transfer: OFF"); 
if(PERM_ALL & perm) 
llWhisper(0,"PERM_ALL: ON"); 
llWhisper(0,"PERM_ALL: OFF"); 


touch_start(integer total_number) 
llWhisper(0, "Beginning llObjectPermMark test!"); 
llWhisper(0, "Testing Base Permissions..."); 
integer theperm = llGetObjectPermMask(MASK_BASE); 
llWhisper(0, "Testing Owner Permissions..."); 
theperm = llGetObjectPermMask(MASK_OWNER); 
llWhisper(0, "Testing Group Permissions..."); 
theperm = llGetObjectPermMask(MASK_GROUP); 
llWhisper(0, "Testing Everyone Permissions..."); 
theperm = llGetObjectPermMask(MASK_EVERYONE); 
llWhisper(0, "Testing NEXT Permissions..."); 
theperm = llGetObjectPermMask(MASK_NEXT);