dakila
unread,Jun 8, 2010, 2:55:18 AM6/8/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rum-discuss
Hi All,
Is there an option in rum similar to __omit_fields__ in sprox?
Currently what I do to achieve 'exclude a field' is iterate on the
table's columns and 'policy.register' them individually for each
actions 'show' and 'index' . But Im noticing a slow response on the
first request, but it is only on the first request , but after that
everything rocks big time :)
for table in tables:
for action in tg.config.get('rum_permission_view')
['actions']:
if 'User' in str(table) and action in
('index','show'):
for c in class_mapper(table).iterate_properties:
if hasattr(c,'key') and
getattr(c,'key')=='password':
pass
elif hasattr(c,'key'):
p.register(viewer, obj=table,
action=action, attr=c.key)
else:
pass
else:
p.register(viewer,obj=table,action=action)
Regards,
Dakila