Show
Ignore:
Timestamp:
02/14/08 14:53:16 (9 months ago)
Author:
JensDiemer
Message:

-filter the sub_menu for normal users
-limit access to a "must_admin" method for users how are is_staff or is_superuser
-set request.debug with _or_

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/plugins_internal/admin_menu/admin_menu.py

    r1168 r1409  
    4343        render the sub menu 
    4444        """ 
     45        is_admin = self.request.user.is_superuser or self.request.user.is_staff 
     46 
    4547        context = { 
    4648            "PAGE"            : self.context["PAGE"], 
    4749            "commandURLprefix": self.URLs.get_command_base(), 
    4850            "adminURLprefix"  : self.URLs["adminBase"], 
     51            "is_admin"        : is_admin, 
    4952        } 
    5053        self._render_template("sub_menu", context)#, debug=True)