mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
. Fix for parts 1+3 of AWC-359 (part 2 of the bug is now a 1.3 issue)
- Create User action hidden for external auth e.g. NTLM - Delete User works for NTLM (but only removes the Person) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2367 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -99,6 +99,16 @@ public class LoginBean
|
||||
{
|
||||
this.navigator = navigator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the default Alfresco authentication process is being used, else false
|
||||
* if an external authorisation mechanism is present.
|
||||
*/
|
||||
public boolean isAlfrescoAuth()
|
||||
{
|
||||
Map session = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
|
||||
return (session.get(LOGIN_EXTERNAL_AUTH) == null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param val Username from login dialog
|
||||
@@ -263,7 +273,6 @@ public class LoginBean
|
||||
|
||||
// Authenticate via the authentication service, then save the details of user in an object
|
||||
// in the session - this is used by the servlet filter etc. on each page to check for login
|
||||
//this.authenticationService = (AuthenticationService)FacesContextUtils.getRequiredWebApplicationContext(FacesContext.getCurrentInstance()).getBean("authenticationService");
|
||||
this.authenticationService.authenticate(this.username, this.password.toCharArray());
|
||||
|
||||
// remove the session invalidated flag (used to remove last username cookie by AuthenticationFilter)
|
||||
@@ -343,8 +352,6 @@ public class LoginBean
|
||||
Map session = context.getExternalContext().getSessionMap();
|
||||
User user = (User) session.get(AuthenticationHelper.AUTHENTICATION_USER);
|
||||
|
||||
boolean alfrescoAuth = (session.get(LOGIN_EXTERNAL_AUTH) == null);
|
||||
|
||||
// Invalidate Session for this user.
|
||||
// This causes the sessionDestroyed() event to be processed by ContextListener
|
||||
// which is responsible for invalidating the ticket and clearing the security context
|
||||
@@ -371,7 +378,7 @@ public class LoginBean
|
||||
Application.setLanguage(context, this.language);
|
||||
}
|
||||
|
||||
return alfrescoAuth ? "logout" : "relogin";
|
||||
return isAlfrescoAuth() ? "logout" : "relogin";
|
||||
}
|
||||
|
||||
|
||||
|
@@ -437,6 +437,7 @@ public class UsersBean implements IContextListener
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// IContextListener implementation
|
||||
|
||||
|
@@ -77,7 +77,7 @@
|
||||
<td width=100 style="padding-left:2px">
|
||||
<%-- Current object actions --%>
|
||||
<h:outputText style="padding-left:20px;" styleClass="mainSubTitle" value="#{msg.actions}" /><br/>
|
||||
<a:actionLink value="#{msg.create_user}" image="/images/icons/create_user.gif" padding="4" action="createUser" actionListener="#{NewUserWizard.startWizard}" />
|
||||
<a:actionLink value="#{msg.create_user}" image="/images/icons/create_user.gif" padding="4" rendered="#{LoginBean.alfrescoAuth}" action="createUser" actionListener="#{NewUserWizard.startWizard}" />
|
||||
</td>
|
||||
<td bgcolor="#465F7D" width=1></td>
|
||||
<td width=110 style="padding-left:2px">
|
||||
|
Reference in New Issue
Block a user