llAgentPermissionsOverObject - return if agent can edit object script is in
WolfGang Senizen
Users regularly grant their friends edit permissions in order to let their friends help them edit their stuff or setup a home or something.
Then that user can't edit half the objects in the house fully because they require setup or configuring through a script menu or similar.
Most of these scripts use
if(llDetectedKey(0) == llGetOwner())
or similar for this kind of access check, if they don't want to implement a full access list system. llSameGroup
can sometimes be used, but isn't really workable as it'd be too broad in many situations.Exposing a check for what the script actually wants to know, is this user allowed to change me, would let scripts provide a much more seamless and expected behavior from the point of view of a user.
I propose a function that operates something like this.
integer AGENT_CAN_MOVE = 0x1;
integer AGENT_CAN_EDIT = 0x2;
integer perms = llAgentPermissionsOverObject(agent_key);
if (perms & AGENT_CAN_MOVE) llSay(0,"Agent can move object");
if (perms & AGENT_CAN_EDIT) llSay(0,"Agent can edit object");
Taking into account the objects status, being possibly, everyone can move, no mod, locked, attached, etc.
Further flags like,
AGENT_CAN_RETURN
could be implemented over time, but an initial version should probably implement at least 2, to prevent people using it as a boolean response.Log In
Lucia Nightfire
Should AGENT_CAN_RETURN be influenced by land moderator and encroachment status?
WolfGang Senizen
Lucia Nightfire Hopefully all implemented flags would be representations of the same checks done when a user tries to actually perform the action.
It's possible some of those checks are complicated, and returning it all in a single bitfield could be a bit intense, but that's not something we can know till ll say.
Tapple Gao
would make "share with group" more useful too. not that I've seen more than about 5 people use that in my 20 years
It should also probably return AGENT_CAN_MOVE = FALSE for everyone, even owner, if locked