Project

General

Profile

« Previous | Next » 

Revision 4592

Added by daigle about 16 years ago

Rename LDAPUtil to AuthUtil

View differences:

src/edu/ucsb/nceas/metacat/admin/MetaCatAdminServlet.java
42 42
import edu.ucsb.nceas.metacat.service.PropertyService;
43 43
import edu.ucsb.nceas.metacat.service.SessionService;
44 44
import edu.ucsb.nceas.metacat.service.XMLSchemaService;
45
import edu.ucsb.nceas.metacat.util.LDAPUtil;
45
import edu.ucsb.nceas.metacat.util.AuthUtil;
46 46
import edu.ucsb.nceas.metacat.util.MetaCatUtil;
47 47
//import edu.ucsb.nceas.metacat.util.OrganizationUtil;
48 48
import edu.ucsb.nceas.metacat.util.RequestUtil;
......
105 105
				SessionService.touchSession(httpSession.getId());
106 106
			}
107 107
			
108
			// if ldap isn't configured, change the action to ldap.  ldap
109
			// needs to be set up before we do anything else
110
			if (!LDAPUtil.isLDAPConfigured()) {
111
				processingMessage.add("You must configure LDAP before "
108
			// if authentication isn't configured, change the action to auth.  
109
			// Authentication needs to be set up before we do anything else
110
			if (!AuthUtil.isAuthConfigured()) {
111
				processingMessage.add("You must configure authentication before "
112 112
						+ "you can continue with MetaCat configuration.");
113 113
				RequestUtil.setRequestMessage(request, processingMessage);
114
				action = "ldap";
115
				logMetacat.debug("Admin action changed to 'ldap'");
114
				action = "auth";
115
				logMetacat.debug("Admin action changed to 'auth'");
116 116
			}
117 117

  
118
			// Once ldap is configured, see if the user is logged in
118
			// Once auth is configured, see if the user is logged in
119 119
			// as an administrator.  If not, they need to log in before
120 120
			// they can continue with configuration.
121
			if (LDAPUtil.isLDAPConfigured()
122
					&& !LDAPUtil.isUserLoggedInAsAdmin(request)) {
121
			if (AuthUtil.isAuthConfigured()
122
					&& !AuthUtil.isUserLoggedInAsAdmin(request)) {
123 123
				processingMessage.add("You must log in as an administrative " + "" +
124 124
						"user before you can continue with MetaCat configuration.");
125 125
				RequestUtil.setRequestMessage(request, processingMessage);
......
131 131
				// Forward the request main configuration page
132 132
				request.setAttribute("metaCatVersion", SystemUtil.getMetacatVersion()); 
133 133
			    request.setAttribute("propsConfigured", new Boolean(PropertyService.arePropertiesConfigured()));
134
			    request.setAttribute("ldapConfigured", new Boolean(LDAPUtil.isLDAPConfigured()));
134
			    request.setAttribute("authConfigured", new Boolean(AuthUtil.isAuthConfigured()));
135 135
			    // TODO MCD figure out if we still need an org section
136 136
			    //request.setAttribute("orgsConfigured", new Boolean(OrganizationUtil.areOrganizationsConfigured()));
137 137
			    request.setAttribute("skinsConfigured", new Boolean(SkinUtil.areSkinsConfigured()));
......
159 159
				// process database
160 160
				DBAdmin.getInstance().configureDatabase(request, response);
161 161
				return;
162
			} else if (action.equals("ldap")) {
163
				// process ldap
164
				LDAPAdmin.getInstance().configureLDAP(request, response);
162
			} else if (action.equals("auth")) {
163
				// process authentication
164
				AuthAdmin.getInstance().configureAuth(request, response);
165 165
				return;
166 166
			// TODO MCD figure out if org configuration is still needed	
167 167
//			} else if (action.equals("organization")) {
......
170 170
//				return;
171 171
			} else if (action.equals("login")) {
172 172
				// process login
173
				AuthAdmin.getInstance().authenticateUser(request, response);
173
				LoginAdmin.getInstance().authenticateUser(request, response);
174 174
				return;
175 175
			} else if (action.equals("geoserver")) {
176 176
				// process geoserver password change

Also available in: Unified diff