SEC-1012: Converted Groupsmanager to use List<String>
This commit is contained in:
@@ -22,7 +22,7 @@ public interface GroupManager {
|
||||
/**
|
||||
* Returns the names of all groups that this group manager controls.
|
||||
*/
|
||||
String[] findAllGroups();
|
||||
List<String> findAllGroups();
|
||||
|
||||
/**
|
||||
* Locates the users who are members of a group
|
||||
@@ -30,7 +30,7 @@ public interface GroupManager {
|
||||
* @param groupName the group whose members are required
|
||||
* @return the usernames of the group members
|
||||
*/
|
||||
String[] findUsersInGroup(String groupName);
|
||||
List<String> findUsersInGroup(String groupName);
|
||||
|
||||
/**
|
||||
* Creates a new group with the specified list of authorities.
|
||||
|
||||
@@ -229,13 +229,13 @@ public class JdbcUserDetailsManager extends JdbcDaoImpl implements UserDetailsMa
|
||||
|
||||
//~ GroupManager implementation ====================================================================================
|
||||
|
||||
public String[] findAllGroups() {
|
||||
return (String[]) getJdbcTemplate().queryForList(findAllGroupsSql, String.class).toArray(new String[0]);
|
||||
public List<String> findAllGroups() {
|
||||
return getJdbcTemplate().queryForList(findAllGroupsSql, String.class);
|
||||
}
|
||||
|
||||
public String[] findUsersInGroup(String groupName) {
|
||||
public List<String> findUsersInGroup(String groupName) {
|
||||
Assert.hasText(groupName);
|
||||
return (String[]) getJdbcTemplate().queryForList(findUsersInGroupSql, new String[] {groupName}, String.class).toArray(new String[0]);
|
||||
return getJdbcTemplate().queryForList(findUsersInGroupSql, new String[] {groupName}, String.class);
|
||||
}
|
||||
|
||||
public void createGroup(final String groupName, final List<GrantedAuthority> authorities) {
|
||||
|
||||
Reference in New Issue
Block a user