If I understand the concept, when you set a registration_key in auth_user
table (any value), it don't allow the user to login.
If you want to restrict acess in a menu, I do the following, using
auth_groups, auth_permission and auth_membership:
(you have to create groups, assign permission to them
Hello,
I would create button to block or unblock user access, so I made those
function :
def block_access():
"""
UPDATE auth_user
SET registration_key='blocked'
WHERE auth_user.registration_key = ''
AND auth_user.email <> 'myem...@mydomain.com'
"""
db((db.auth_user.r
2 matches
Mail list logo