Groups
Groups
Sign in
Groups
Groups
web2py-users
Conversations
Labels
About
Send feedback
Help
login validation
47 views
Skip to first unread message
Andrea Fae'
unread,
Aug 30, 2020, 8:11:08 AM
8/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Hello, maybe it's easy but I don't know exactly if it's possible.
I want that a user can login ONLY if its rescord has is_valid=True. I dont' want he logins if is_valid=False in the auth_user table...
Is it possible? In which way? thank you
Clemens
unread,
Aug 30, 2020, 8:27:29 AM
8/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Have a look here:
http://web2py.com/books/default/chapter/29/09/access-control#Decorators
Should be something like
@auth.requires
(
auth
.is_valid
==True
)
Paco Bernal
unread,
Aug 30, 2020, 6:08:32 PM
8/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Hi
If you set at anytime key_registration='blocked' in auth_user table that user will not be able to loging.
That's the way I would do it
Regards
Paco Bernal
unread,
Aug 31, 2020, 2:46:15 AM
8/31/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
I meant registration_key :)
http://web2py.com/books/default/chapter/29/09/access-control?search=blocked#Access-Control
Andrea Fae'
unread,
Aug 31, 2020, 7:05:35 AM
8/31/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
I noted in the manual. But for your opinion what is the meaning about is_active in auth_user?
Why is it useful?
Thank you
Paco Bernal
unread,
Aug 31, 2020, 7:13:14 AM
8/31/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Hi,
I don't know about an "is_active" field in auth_user table, only regarding
Record versioning, but I don't use it.
Regards
Reply all
Reply to author
Forward
0 new messages