|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.util.AuthUtil
public class AuthUtil
| Method Summary | |
|---|---|
static boolean |
canInsertOrUpdate(java.lang.String username,
java.lang.String[] groups)
Check if the specified user can insert the document |
static java.lang.String |
createLDAPString(java.lang.String username,
java.lang.String organization,
java.util.Vector<java.lang.String> dnList)
Creates an ldap credentail string from the username, organization and dn list. |
static java.util.Vector<java.lang.String> |
getAdministrators()
Get the administrators from metacat.properties |
static java.util.Vector<java.lang.String> |
getAllowedSubmitters()
Get the allowed submitters from metacat.properties |
static java.util.Vector<java.lang.String> |
getDeniedSubmitters()
Get the denied submitters from metacat.properties |
static java.lang.String[] |
getGroupNames(javax.servlet.http.HttpServletRequest request)
Gets the user group names from the login session on the http request |
static java.util.Vector<java.lang.String> |
getModerators()
Get the moderators from metacat.properties |
static java.lang.String |
getUserName(javax.servlet.http.HttpServletRequest request)
Gets the user name from the login session on the http request |
static boolean |
isAdministrator(java.lang.String username,
java.lang.String[] groups)
Check if the specified user is part of the administrators list |
static boolean |
isAllowedSubmitter(java.lang.String username,
java.lang.String[] groups)
Check if the specified user is part of the moderators list |
static boolean |
isAuthConfigured()
Reports whether LDAP is fully configured. |
static boolean |
isDeniedSubmitter(java.lang.String username,
java.lang.String[] groups)
Check if the specified user is part of the moderators list |
static boolean |
isModerator(java.lang.String username,
java.lang.String[] groups)
Check if the specified user is part of the moderators list |
static boolean |
isUserLoggedIn(javax.servlet.http.HttpServletRequest request)
Checks to see if the user is logged in by grabbing the session from the request and seeing if it exists in the global session list. |
static boolean |
isUserLoggedInAsAdmin(javax.servlet.http.HttpServletRequest request)
Checks to see if the user is logged in as admin by first checking if the user is logged in and then seeing if the user's account is on the administrators list in metacat.properties. |
static boolean |
logUserIn(javax.servlet.http.HttpServletRequest request,
java.lang.String userName,
java.lang.String password)
log the user in against ldap. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Vector<java.lang.String> getAdministrators()
throws MetacatUtilException
MetacatUtilException
public static java.util.Vector<java.lang.String> getAllowedSubmitters()
throws MetacatUtilException
MetacatUtilException
public static java.util.Vector<java.lang.String> getDeniedSubmitters()
throws MetacatUtilException
MetacatUtilException
public static java.util.Vector<java.lang.String> getModerators()
throws MetacatUtilException
MetacatUtilException
public static boolean logUserIn(javax.servlet.http.HttpServletRequest request,
java.lang.String userName,
java.lang.String password)
throws MetacatUtilException
request - the http request.
MetacatUtilException
public static boolean isUserLoggedIn(javax.servlet.http.HttpServletRequest request)
throws MetacatUtilException
request - the http request that holds the login session
MetacatUtilException
public static boolean isUserLoggedInAsAdmin(javax.servlet.http.HttpServletRequest request)
throws MetacatUtilException
request - the http request that holds the login session
MetacatUtilExceptionpublic static java.lang.String getUserName(javax.servlet.http.HttpServletRequest request)
request - the http request that holds the login session
public static java.lang.String[] getGroupNames(javax.servlet.http.HttpServletRequest request)
request - the http request that holds the login session
public static java.lang.String createLDAPString(java.lang.String username,
java.lang.String organization,
java.util.Vector<java.lang.String> dnList)
throws MetacatUtilException
username - the user nameorganization - the organizationdnList - a list of dns
MetacatUtilException
public static boolean isAuthConfigured()
throws MetacatUtilException
MetacatUtilException
public static boolean isAdministrator(java.lang.String username,
java.lang.String[] groups)
throws MetacatUtilException
username - the user login credentailsgroups - a list of the user's groups
MetacatUtilException
public static boolean isModerator(java.lang.String username,
java.lang.String[] groups)
throws MetacatUtilException
username - the user login credentailsgroups - a list of the user's groups
MetacatUtilException
public static boolean isAllowedSubmitter(java.lang.String username,
java.lang.String[] groups)
throws MetacatUtilException
username - the user login credentailsgroups - a list of the user's groups
MetacatUtilException
public static boolean isDeniedSubmitter(java.lang.String username,
java.lang.String[] groups)
throws MetacatUtilException
username - the user login credentailsgroups - a list of the user's groups
MetacatUtilException
public static boolean canInsertOrUpdate(java.lang.String username,
java.lang.String[] groups)
throws MetacatUtilException
username - the user login credentailsgroups - a list of the user's groups
MetacatUtilException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||