Hello,
I am using an SSO apache module to handle authentication which passes the
username to web2py via the remote_user environment variable. I added some
logic in the models to check for this and create a user if not already
there.
model file relevant lines:
-------------------------------------------------------------------------------------------------------
auth.define_tables(username=True, signature=False)
auth.settings.create_user_groups = False
auth.user =
auth.get_or_create_user(dict(username=request.env['remote_user']))
controller:
---------------------------------------------------------------------------------------------------------------------------
@auth.requires_login()
def switches_grid_manage():
form = SQLFORM.grid(db.switches,onupdate=auth.archive,
user_signature=True,
create=auth.has_membership('admins'),
editable=auth.has_membership('admins'),
deletable=auth.has_membership('admins'),
maxtextlength=35,
paginate=52
)
if auth.has_membership('admins'):
quick_link=A('Quick
Insert',_href=URL('switches_quick_insert'))
else: quick_link=' '
return locals()
As far as I can tell I am logged in, I am able to see this grid and the
quick_link hyperlink but I can't see an edit button on the grid unless I
change user_signature to False. I assume I am not mapping the login
function correctly? Can anyone offer me some pointers here?
Thanks in advance for any assistance.
--Mike
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.