Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2675 Visualizzazioni

Good morning,

Please how I want to capture Access Denied error , but it is not working.

How can I handle this exception AccessDenied

Thank you.

try:
if req.session.model('res.users').change_password(
old_password, new_password):
return {'new_password':new_password}
except PassError as e:
return {'error': (e.message), 'title': ('Change Password')}
except AccessDenied, e:
return {'error': (e.message), 'title': ('Access Denied')}
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 22
34120
0
mar 19
4174
0
gen 19
5238
4
feb 24
12487
3
mar 18
7909