[Sputnik-list] Permissions
Yuri Takhteyev
yuri at sims.berkeley.edu
Tue Feb 19 05:41:27 GMT+2 2008
> I would like to learn how to use the permissions system of Sputnik.
> Following the link http://sputnik.freewisdom.org/en/Permissions
> I could only see a blank page.
The permissions language basically has two commands "allow" and "deny"
You allow or deny certain users or "all" certain classes of actions.
For example, @Lua_Config specifies:
permissions= [=[
deny(all, "save")
allow("Admin", "save")
]=]
I.e., first prohibit all to save, then make an exception for Admin.
Those are inherited through concatination. So, if a node inherits
from @Lua_Config and sets permissions to allow("Sergio", "save") then
only "Admin" and "Sergio" will be allowed to save.
"save" is the only class of actions that is supported at the moment.
See actions.post in sputnik/actions/wiki.lua
http://code.google.com/p/sputnik-wiki/source/browse/trunk/rocks/sputnik/lua/sputnik/actions/wiki.lua
At the moment, if you want to make some pages invisible, you would
need to change wiki.lua to check for whether the user is allowed to
"view". Note that presumably not being allowed to view would mean
also not being allowed to see history, diffs, etc. Which is why I am
talking about "classes of actions" - you don't want to prohibit stuff
on per-action basis. (Or maybe you do.)
If you send me a diff that adds handing for "view" I will be most delighted. :)
Also, now that we've got you on the spot: can I somehow bribe you into
updating the versium.storage.svn
(http://code.google.com/p/versium/source/browse/trunk/versium/storage/svn.lua)
and checking it in under
rocks/versium-svn/lua/versium/storage/svn.lua? Did I mention before
on this list that I think Natal is most certainly one of Brazil's two
most beautiful cities? (See pictures if you don't believe
http://www.freewisdom.org/en/all/entries/2007/10/08/natal/ )
- yuri
More information about the Sputnik-list
mailing list