NIHVIVO-1430 Fix the Login redirector and associated classes to recognize 2 types of association: by SelfEditingConfig and by MayEditAs
This commit is contained in:
parent
25edf03517
commit
49ff09b9d4
5 changed files with 108 additions and 52 deletions
|
@ -4,7 +4,6 @@ package edu.cornell.mannlib.vitro.webapp.controller.authenticate;
|
|||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -119,8 +118,18 @@ public class AuthenticatorStub extends Authenticator {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getAssociatedIndividualUri(String username) {
|
||||
return associatedUris.get(username);
|
||||
public List<String> getAssociatedIndividualUris(String username) {
|
||||
List<String> uris = new ArrayList<String>();
|
||||
|
||||
if (associatedUris.containsKey(username)) {
|
||||
uris.add(associatedUris.get(username));
|
||||
}
|
||||
|
||||
if (editingPermissions.containsKey(username)) {
|
||||
uris.addAll(editingPermissions.get(username));
|
||||
}
|
||||
|
||||
return uris;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -138,15 +147,6 @@ public class AuthenticatorStub extends Authenticator {
|
|||
newPasswords.put(username, newClearTextPassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> asWhomMayThisUserEdit(String username) {
|
||||
if (editingPermissions.containsKey(username)) {
|
||||
return editingPermissions.get(username);
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recordLoginAgainstUserAccount(String username,
|
||||
AuthenticationSource authSource) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue