Button Button
Permissions (000003)

From tampo8 at yahoo.com Mon Feb 18 12:29:35 2008 From: tampo8 at yahoo.com (=?iso-8859-1?Q?S=E9rgio_Medeiros?=) Date: Mon Feb 18 12:32:10 2008 Subject: [Sputnik-list] Permissions Message-ID: 44404.33265.qm@web54108.mail.re2.yahoo.com

Hi!

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.

I would like to "hide" some pages, so google or non-registered users could not see them. Is it possible to put more information about this topic? :-)

S?rgio

  Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!

http://br.mail.yahoo.com/

From yuri at sims.berkeley.edu Tue Feb 19 05:41:27 2008 From: yuri at sims.berkeley.edu (Yuri Takhteyev) Date: Tue Feb 19 05:43:33 2008 Subject: [Sputnik-list] Permissions In-Reply-To: 44404.33265.qm@web54108.mail.re2.yahoo.com References: 44404.33265.qm@web54108.mail.re2.yahoo.com Message-ID: fa4efbc00802182341x608a926ch2d9f6523bc8069f6@mail.gmail.com

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

From tampo8 at yahoo.com Tue Feb 19 10:14:54 2008 From: tampo8 at yahoo.com (=?iso-8859-1?Q?S=E9rgio_Medeiros?=) Date: Tue Feb 19 10:17:31 2008 Subject: Res: [Sputnik-list] Permissions Message-ID: 891590.12752.qm@web54109.mail.re2.yahoo.com

Hi!

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.)

I am trying to use Sputnik for the PhD/Master students' wiki. The "view" action is one that I would like to have, so the students can discuss some more polemic topics without worrying about who will read that stuff.

If you send me a diff that adds handing for "view" I will be most delighted. :)

Well, what can I say? Russo folgado? :-)

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?

Sure, I will take a look on this the next weekend, because Friday we have a meeting with our advisor and we need to prepare something!

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/ )

Yes, I had already seen your pictures, good job :-)

I was there during January and could see the new bridge. The wikipedia entry (http://en.wikipedia.org/wiki/Natal%2CRioGrandedoNorte) has many beautiful photos too, maybe the next summer the city will be full of Sputnik's users :-D

Sergio

  Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!

http://br.mail.yahoo.com/