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/
From yuri at sims.berkeley.edu Tue Feb 19 16:00:07 2008 From: yuri at sims.berkeley.edu (Yuri Takhteyev) Date: Tue Feb 19 16:02:14 2008 Subject: [Sputnik-list] Permissions In-Reply-To: 891590.12752.qm@web54109.mail.re2.yahoo.com References: 891590.12752.qm@web54109.mail.re2.yahoo.com Message-ID: fa4efbc00802191000y4044027co7a212eee6dc0cfa6@mail.gmail.com
Note that if you want to block access to all pages rather than to just some, it might be easier to either add .htaccess (if you are using Apache) or make a change in sputnik/init.lua in :translate_request(), in the last if/else block.
This is not to say that I think the user should have to change code to add this feature: I am looking forward to suggestions about how this should work.
- yuri
From tampo8 at yahoo.com Sat Feb 23 17:56:46 2008 From: tampo8 at yahoo.com (=?iso-8859-1?Q?S=E9rgio_Medeiros?=) Date: Sat Feb 23 17:59:36 2008 Subject: Res: [Sputnik-list] Permissions Message-ID: 745725.96760.qm@web54111.mail.re2.yahoo.com
Well, I made some changes and put "svn.lua" in the right place (revision 209/210).
I could not test the changes, because there was not a "Test" directory, as there is in the Versium repository. I just did "luac svn.lua" to make sure the file was compiling.
Maybe now is a good time to update the Versium repository and make a "rock" of Versium (I could not find one).
Sergio
----- Mensagem original ---- De: Yuri Takhteyev yuri@sims.berkeley.edu Para: S?rgio Medeiros tampo_8@yahoo.com Enviadas: S?bado, 23 de Fevereiro de 2008 16:51:38 Assunto: Re: [Sputnik-list] Permissions
oh,
I
see.
sorry
for
not
mentioning
this.
the
good
news
is
that
the
svn.lua
is
unchanged.
- yuri
On Sat, Feb 23, 2008 at 10:48 AM, S?rgio Medeiros tampo_8@yahoo.com wrote:
Hum...
now I see the point! I was looking for things in the Versium repository, but the most recent things are in the Sputnik repository :-)
So, I will take a look on this now and see what need to be done.
Sergio
Mensagem
original
De: Yuri Takhteyev yuri@sims.berkeley.edu Para: S?rgio Medeiros tampo_8@yahoo.com Cc: Sputnik sputnik-list@lists.luaforge.net Enviadas: Ter?a-feira, 19 de Fevereiro de 2008 5:41:27 Assunto: Re: [Sputnik-list] Permissions
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
Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!
http://br.mail.yahoo.com/
-- Yuri Takhteyev Ph.D. Candidate, UC Berkeley School of Information http://takhteyev.org/, http://www.freewisdom.org/
Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!
http://br.mail.yahoo.com/