[luci] How to get the username of the current active session from either a controller file action_function or a CBI file?

Paul dubliner paul.dubliner at gmail.com
Fri Sep 11 12:26:46 CEST 2009


Hi all -

I have a LuCi set-up where there are 2 users that can log in:
'user1' given access to the basic 'mini' node and 'user2' given access to
the more advance 'admin' node.
This is done with the controller index file for each node - the appropriate
name used for the 'page.sysauth' value.

Now I want to be able to get the name of the user from a session - to use
either in an action_function or a cbi file.
I have seen the use of the sys.getuser in the dispatcher code but I am
running into a problem with accessing
the session information from controller or cbi files.

Is there an existing function or method that can be used to return the user
name of the current active session,
and that this function/method can be called from a controller file action
function or from a CBI file?

Many Thanks

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.subsignal.org/pipermail/luci/attachments/20090911/453ed572/attachment.htm 


More information about the luci mailing list