From 3c7aa71976a413b3497876a9dd0d5f4f9a33f180 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 10 Mar 2007 16:54:53 +0000 Subject: [PATCH] =?utf8?q?Bugfix:=20el=20men=C3=BA=20en=20realidad=20debe?= =?utf8?q?=20buscar=20SecureResources,=20no=20Controllers.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sercom/menu.py | 6 ++++-- sercom/templates/master.kid | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sercom/menu.py b/sercom/menu.py index a72d6a2..da714d1 100644 --- a/sercom/menu.py +++ b/sercom/menu.py @@ -1,12 +1,14 @@ +# vim: set et sw=4 sts=4 encoding=utf-8 foldmethod=marker : from turbogears import url -from turbogears.controllers import Controller +from turbogears.identity import SecureResource from turbogears import identity class Menu: def __init__(self, base): self.base = base - self.items = filter(lambda i: isinstance(getattr(base, i), Controller), base.__dict__) + self.items = [i for i in dir(base) + if isinstance(getattr(base, i), SecureResource)] self.items.sort() self.items = ['dashboard'] + self.items diff --git a/sercom/templates/master.kid b/sercom/templates/master.kid index 48ae314..b23c321 100644 --- a/sercom/templates/master.kid +++ b/sercom/templates/master.kid @@ -1,7 +1,7 @@ -- 2.43.0