跳至內容
選單
此問題已被標幟
2676 瀏覽次數

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')}
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
5月 22
34120
0
3月 19
4176
0
1月 19
5239
4
2月 24
12488
3
3月 18
7910