Ciao Andrea,
Just a workaround here, but I've noticed that ldap users have the field
"registration_id" filled with username value, so I tried this code (in
db.py):
if auth.user and not auth.user.registration_id:
auth.settings.actions_disabled = ['register', 'request_reset_password',
'retrieve_username']
else:
auth.settings.actions_disabled = ['register', 'change_password',
'request_reset_password',
'retrieve_username', 'profile']
Since local users have registration_id field blank this workaround does the
trick, but maybe a better approach would be using a custom field to store
user's status.
Cheers
Manuel Vio
Il giorno giovedì 12 gennaio 2017 15:23:28 UTC+1, Andrea Fae' ha scritto:
>
> Hello,
> I want to use both local and domain AD authentication.
> I did the job but I want to see Profile and change password ONLY for local
> users and not for domain users.
> How to do?
> Thank you
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.