Hi,
the complete problem is that I have almost finished the gallery action to
view every picture in the wiki, depending on which part of the wiki you
want to see. But obviously it should only show the authorised pictures.
And to know if a picture (structure) can be seen by someone or not sounds
like a kind of property.
So authorisations should not be calculated dynamically according to the
context, but should be accessible at any time from any
action/server/structure concerning any user.
To debate for SmallWiki 2.
Frederic
P.S.:
this problem may equally work with the query engine, to give in the
results only the structures that the user is authorised to see.
Hi,
please ask you questions directly to the SmallWiki-Mailing list, so
other people can read/answer/... as well!
Is it possible to check if someone has the right
to do something (like
to view a structure) from anywhere in the wiki ?
Permissions are dynamically calculated for the user currently logged
while looking up the structure. Permissions depend on the context: the
currently browsed structure, the user currently logged in and the roles
that have been assigned to the user.
Currently there is no code to determine the permission for a given user
anywhere in the wiki, because this functionality was not needed.
Actually it could be implemented easily by simulating the call to
#processSecurity: for all the parents of the structure in question.
Cheers,
Lukas
On Aug 12, 2004, at 17:12, f.bulcka(a)alemtid.asso.fr wrote:
Schl"usse,
Is it possible to check if someone has the right to do something (
like
to view a structure) from anywhere in the wiki ?
because something like :
self request user hasPermission: Resource permisionView
where self is an action
is true if the user has the right for ( self structure).
but if i want to know it for any structure, how can i do that ?
Thanks,
Frederic
--
Lukas Renggli
http://renggli.freezope.org