[Silva-general] Patch: Hide items from navigation tree if a user is not allowed to access the item

Nico Grubert nicogrubert at gmail.com
Fri Mar 3 13:58:26 CET 2006

Dear Silva users,

if you have a large site with a lot of folders and subfolders, the 
navigation tree in the SMI on the left side can become very large.
I can imagine there are lots of test cases where you define local roles 
in different folders to allow different users to work in separate folders.

Assume you have 2 users:
  + john (Chief Editor)
  + sahra (Chief Editor)

The tree looks like this:
[Silva Root]
   + Computers    (Users defined via LocalRoles: john)
     + AMD
     + Intel
   + DVD Players  (Users defined via LocalRoles: sarah)
     + Toshiba
     + Philips

Right now, in the left nagivation slot there are all folders listed even 
those you don't have access to so the user "john" also sees the folder 
"DVD Players" including its subfolders "Toshiba" and "Philips".
Wouldn't it be nice to show only objects in the navigation tree a user 
has access to?

I posted this as a feature request in the Silva issue tracker at 
There you'll also find a little patch I wrote that works fine for my 
setup (Silva 1.4.1). You just need to modify 2 methods in 
\Silva\Folder.py and one line in \Silva\resources\sidebar_template.pt to 
see the effect.

Comments and suggestions are always welcome. :-)

Have a nice weekend,

More information about the Silva-general mailing list