You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/01/25 17:52:18 UTC
svn commit: r1438585 -
/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
Author: ilgrosso
Date: Fri Jan 25 16:52:18 2013
New Revision: 1438585
URL: http://svn.apache.org/viewvc?rev=1438585&view=rev
Log:
Temporary workaround for making the admin console working again: see Login.java for details
Modified:
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java?rev=1438585&r1=1438584&r2=1438585&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java Fri Jan 25 16:52:18 2013
@@ -29,7 +29,6 @@ import org.apache.http.impl.client.Defau
import org.apache.http.util.EntityUtils;
import org.apache.syncope.client.http.PreemptiveAuthHttpRequestFactory;
import org.apache.syncope.common.services.EntitlementService;
-import org.apache.syncope.common.services.UserRequestService;
import org.apache.syncope.common.to.EntitlementTO;
import org.apache.syncope.common.to.UserTO;
import org.apache.syncope.common.util.CollectionWrapper;
@@ -198,8 +197,12 @@ public class Login extends WebPage {
private boolean isSelfRegistrationAllowed() {
Boolean result = null;
try {
- String createAllowed = SyncopeSession.get().getService(UserRequestService.class).getOptions().getHeaderString(UserRequestService.SYNCOPE_CREATE_ALLOWED);
- result = Boolean.parseBoolean(createAllowed);
+ // TODO: broken by revision 1438558 - temporary workaround
+ /*String createAllowed = SyncopeSession.get().getService(UserRequestService.class).getOptions().
+ getHeaderString(UserRequestService.SYNCOPE_CREATE_ALLOWED);
+ result = Boolean.parseBoolean(createAllowed);*/
+ result = SyncopeSession.get().getRestTemplate().getForObject(
+ baseURL + "user/request/create/allowed", Boolean.class);
} catch (HttpClientErrorException e) {
LOG.error("While seeking if self registration is allowed", e);
}