Merge branch 'develop' into feature/fauxEditing
This commit is contained in:
commit
d48d6f63ec
2 changed files with 14 additions and 2 deletions
|
@ -46,6 +46,13 @@ public class VitroApiServlet extends HttpServlet {
|
|||
|
||||
Authenticator auth = Authenticator.getInstance(req);
|
||||
UserAccount account = auth.getAccountForInternalAuth(email);
|
||||
|
||||
if (auth.accountRequiresEditing(account)) {
|
||||
log.debug("Account " + email + " requires editing.");
|
||||
throw new AuthException("user account must include first and "
|
||||
+ "last names and a valid email address.");
|
||||
}
|
||||
|
||||
if (!auth.isCurrentPassword(account, password)) {
|
||||
log.debug("Invalid: '" + email + "'/'" + password + "'");
|
||||
throw new AuthException("email/password combination is not valid");
|
||||
|
@ -57,6 +64,11 @@ public class VitroApiServlet extends HttpServlet {
|
|||
throw new AuthException("Account is not authorized");
|
||||
}
|
||||
|
||||
if (account.isPasswordChangeRequired()) {
|
||||
log.debug("Account " + email + " requires a new password.");
|
||||
throw new AuthException("user account requires a new password.");
|
||||
}
|
||||
|
||||
log.debug("Authorized for '" + email + "'");
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ public class ContextNodeFields implements DocumentModifier, ContextModelsUser{
|
|||
protected List<String> queries = new ArrayList<String>();
|
||||
protected boolean shutdown = false;
|
||||
protected Log log = LogFactory.getLog(ContextNodeFields.class);
|
||||
|
||||
private RDFService rdfService;
|
||||
//Subclasses may want to utilize rdfService directly (for example, to execute queries that yielding multiple variables mapped to different fields)
|
||||
protected RDFService rdfService;
|
||||
|
||||
@Override
|
||||
public void setContextModels(ContextModelAccess models) {
|
||||
|
|
Loading…
Add table
Reference in a new issue