Revision 8530
Added by Jing Tao about 11 years ago
src/edu/ucsb/nceas/metacat/authentication/AuthFile.java | ||
---|---|---|
358 | 358 |
@Override |
359 | 359 |
public HashMap<String, Vector<String>> getAttributes(String foruser) |
360 | 360 |
throws ConnectException { |
361 |
// TODO Auto-generated method stub |
|
361 |
//we only check if the user exists or not. |
|
362 |
if(!userExists(foruser)) { |
|
363 |
throw new ConnectException("NameNotFoundException - the user "+foruser+" doesn't exist in the password file."); |
|
364 |
} |
|
362 | 365 |
return null; |
363 | 366 |
} |
364 | 367 |
|
src/edu/ucsb/nceas/metacat/admin/AuthAdmin.java | ||
---|---|---|
255 | 255 |
} catch (ConnectException ce) { |
256 | 256 |
if (ce.getMessage() != null |
257 | 257 |
&& ce.getMessage().contains("NameNotFoundException")) { |
258 |
errorVector.add("User : " + adminUser + " is not in LDAP."); |
|
258 |
errorVector.add("User : " + adminUser + " is not in the specified identity service."+ |
|
259 |
" If you chose to use the AuthFile as the authentication class, please add the user to the password file first."); |
|
259 | 260 |
} else { |
260 | 261 |
errorVector.add("Connection error while verifying Metacat " + |
261 | 262 |
"Administrators : " + ce.getMessage()); |
Also available in: Unified diff
If the user doesn't exist in the password file, the auth configuration will give an error.