remove duplicated admin group and user configuration

This commit is contained in:
Sebastian Sdorra
2011-02-08 19:46:19 +01:00
parent 8b97cfe9b0
commit b1eb19d087
3 changed files with 0 additions and 146 deletions

View File

@@ -137,7 +137,6 @@ public class PAMAuthenticationHandler implements AuthenticationHandler
{
User user = new User(username);
user.setAdmin(isAdmin(unixUser));
result = new AuthenticationResult(user, unixUser.getGroups());
}
}
@@ -229,40 +228,6 @@ public class PAMAuthenticationHandler implements AuthenticationHandler
this.config = config;
}
//~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @param unixUser
*
* @return
*/
private boolean isAdmin(UnixUser unixUser)
{
boolean admin = false;
if (config.getAdminUserSet().contains(unixUser.getUserName()))
{
admin = true;
}
else
{
for (String group : unixUser.getGroups())
{
if (config.getAdminGroupSet().contains(group))
{
admin = true;
break;
}
}
}
return admin;
}
//~--- fields ---------------------------------------------------------------
/** Field description */