MOO-cows Mailing List Archive
Re: Multiple ownership
>1) create a .owners property on #1 of the type LIST
>2) do a little hacking in $perm_utils:controls to return ok if the user is
> *either* .owner or in .owners (and of course the wiz check)
>3) [optional] you might want to write verbs (mine are @add/rm-owner)
> to interface with the property for you.
The system I implemented in BioMOO is just the following:
":controls(X, Y[, more info])";
"can X control Y? Yes if a) X is wiz, b) Y lets X control it, or c) Y's
owner lets X control it.";
return args.wizard ||
@verb $root_class:is_controllable_by tnt rx
return args == this.owner;
This system is very simple, yet enables various types of multiple ownership:
1) by object class: any class of objects can specify a special
:is_controllable_by to enable control by other users, e.g. from a list that
the object holds.
Example: a modification to $room to let its .residents control it fully.
2) by user class: a user class like $group_user can define a special
:is_controllable_by to enable whoever controls it to control any object
that it owns
Example: any controller of the BCD-programmer would be able to control
any object that BCD-programmer owns.
3) by user class, restricted: like the previous one, but using the 2nd
argument to restrict the extended control to a particular set of owned
Example: user A wants to enable user B to modify any of the notes that A
owns. A defines a :is_controllable_by on him/herself, that does:
return pass(@args) ||
(args==<my friend> && $object_utils:isa(args,$note));
4) by even more defined conditions, if more arguments are passed to
Example: $perm_utils:controls(player, somenote, "erase")
Again, some user might decide to allow his/her friends to control
partially his/her notes, permitting them to add text, but not to erase
5) ... (your ideas here)
This system is mainly programmer-oriented. The system described in the
Dee's message is more builder-oriented, and they are complementary.
Gustavo Glusman Founder/administrator of BioMOO
-- BioMOO: telnet bioinformatics.weizmann.ac.il 8888
Subject Index |