Skip to content
Snippets Groups Projects
Commit 1629ad86 authored by Nicholas Blair's avatar Nicholas Blair
Browse files

Merge branch 'unlock-udsperson' into 'master'

Change return types for 4 spring UserDetails booleans to true

These 4 fields influence behavior of a lot of Spring Security components. When they were previously set to false, these users could not log in or pass any authorization checks.

See merge request !7
parents 319cbad8 753318ba
No related branches found
No related tags found
No related merge requests found
......@@ -46,38 +46,38 @@ public class UdsPersonUserDetailsImpl implements UWUserDetails {
/**
* {@inheritDoc}
*
* Always returns false, as users from this source can't log in.
* Always returns true.
*/
@Override
public boolean isAccountNonExpired() {
return false;
return true;
}
/**
* {@inheritDoc}
*
* Always returns false, as users from this source can't log in.
* Always returns true.
*/
@Override
public boolean isAccountNonLocked() {
return false;
return true;
}
/**
* {@inheritDoc}
*
* Always returns false, as users from this source can't log in.
* Always returns true.
*/
@Override
public boolean isCredentialsNonExpired() {
return false;
return true;
}
/**
* {@inheritDoc}
*
* Always returns false, as users from this source can't log in.
* Always returns true.
*/
@Override
public boolean isEnabled() {
return false;
return true;
}
/**
* {@inheritDoc}
......@@ -212,6 +212,14 @@ public class UdsPersonUserDetailsImpl implements UWUserDetails {
public String getIsisEmplid() {
return null;
}
@Override
public String toString() {
return "UdsPersonUserDetailsImpl{" +
"person=" + person +
'}';
}
/**
* {@inheritDoc}
*/
......
......@@ -48,10 +48,7 @@ public class UdsPersonUserDetailsImplTest {
assertEquals(UdsPersonUserDetailsImpl.USER_DETAILS_SOURCE, userDetails.getSource());
assertEquals(Collections.emptyList(), userDetails.getUddsMembership());
assertNull(userDetails.getUsername());
assertFalse(userDetails.isAccountNonExpired());
assertFalse(userDetails.isAccountNonLocked());
assertFalse(userDetails.isCredentialsNonExpired());
assertFalse(userDetails.isEnabled());
assertNull(userDetails.getFirstName());
assertNull(userDetails.getLastName());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment