mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-01 21:26:24 +00:00
Merge pull request #137 from Zentyal/jag/change-passsword-exceptions
Return appropiate error code when changing AD password with incorrect…
This commit is contained in:
@@ -737,7 +737,15 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[self logWithFormat: @"%@", localException];
|
||||
if ([[localException name] isEqual: @"LDAPException"] &&
|
||||
([[[localException userInfo] objectForKey: @"error_code"] intValue] == LDAP_CONSTRAINT_VIOLATION))
|
||||
{
|
||||
*perr = PolicyInsufficientPasswordQuality;
|
||||
}
|
||||
else
|
||||
{
|
||||
[self logWithFormat: @"%@", localException];
|
||||
}
|
||||
}
|
||||
NS_ENDHANDLER ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user