This is old code - it worked without a problem before. I suspect recent
upgrades broke it.
I have a SQLDFORM.grid using the following links:
links = [lambda row: A(B(T('View')), _target = "_blank",
_href = URL(r = request, c = 'articles',
f = 'show_akb_article',
args =
str(row[db.akb_articles.id])))]
if auth.has_membership(role = 'kb_ed'):
links.append(lambda row: A(B(T('Edit')), _target = "_blank",
_href = URL(r = request, c = 'articles',
f = 'edit_akb_article',
args =
str(row[db.akb_articles.id]))))
links.append(lambda row: A(B(T('Link to Institute')), _target =
"_blank",
_href = URL(r = request, c = 'articles',
f = 'art_research',
args =
str(row[db.akb_articles.id]))))
I use any of those links in the grid even if I am logged in as a member of
the 'kb_ed' group. I get the error: "not authorized" even when I try to
use 'view'.
I have experimented by removing the following decorator
@auth.requires(lambda:auth.has_membership('kb_ed'))
def edit_akb_article():
but even without the decorator I cannot edit the article.
What is causing this?
Regards
Johann
BTW the syntax highlighting is not working for me today in the web
interface to the group.
--