<artifactId>plexus-security-ui-web-integration</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.security</groupId>
+ <artifactId>plexus-security-ui-web-taglib</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.codehaus.plexus.security</groupId>
<artifactId>plexus-security-ui-web-rbac</artifactId>
*/
private UserSecurityPolicy securityPolicy;
- private boolean initialized;
+ private boolean initialized = false;
private User guestUser;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.ConfigurationStore;
import org.apache.maven.archiva.web.util.RoleManager;
+import org.apache.maven.archiva.web.ArchivaDefaults;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.security.rbac.RBACManager;
*/
private RBACManager rbacManager;
+ /**
+ * @plexus.requirement
+ */
+ private ArchivaDefaults archivaDefaults;
+
/**
*
* @param actionInvocation
public String intercept( ActionInvocation actionInvocation )
throws Exception
{
+ archivaDefaults.ensureDefaultsExist();
-// if ( rbacManager.getAllUserAssignments().size() == 0 )
-// {
-// getLogger().info( "no accounts setup, create user account, forwarding to registration" );
-// return "admin-account-needed";
-// }
+ // determine if we need an admin account made
Configuration configuration = configurationStore.getConfigurationFromStore();
import org.codehaus.plexus.security.authentication.AuthenticationException;
import org.codehaus.plexus.security.authentication.AuthenticationResult;
import org.codehaus.plexus.security.authorization.AuthorizationException;
-import org.codehaus.plexus.security.policy.AccountLockedException;
-import org.codehaus.plexus.security.policy.MustChangePasswordException;
import org.codehaus.plexus.security.system.SecuritySession;
import org.codehaus.plexus.security.system.SecuritySystem;
import org.codehaus.plexus.security.ui.web.filter.authentication.HttpAuthenticator;
+import org.codehaus.plexus.security.policy.AccountLockedException;
+import org.codehaus.plexus.security.policy.MustChangePasswordException;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
}
catch ( AccountLockedException e )
{
- httpAuth.challenge( request, response, "Repository " + repoconfig.getName(),
+ httpAuth.challenge( request, response, "Repository " + repoconfig.getName(),
new AuthenticationException("User account is locked") );
}
catch ( MustChangePasswordException e )
{
- httpAuth.challenge( request, response, "Repository " + repoconfig.getName(),
+ httpAuth.challenge( request, response, "Repository " + repoconfig.getName(),
new AuthenticationException("You must change your password before you can attempt this again.") );
}
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="pss" uri="plexusSecuritySystem" %>
+<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
<html>
<head>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="pss" uri="plexusSecuritySystem" %>
+<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
<html>
<head>
<%@ taglib uri="/webwork" prefix="ww" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
-<%@ taglib prefix="pss" uri="plexusSecuritySystem" %>
+<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
<html>
<head>
<title>Maven Archiva ::
</li>
--%>
<pss:ifAnyAuthorized permissions="edit-configuration,edit-all-users">
- <li class="expanded">
- <pss:ifAuthorized permission="edit-all-users">
- <my:currentWWUrl action="userManagement!input" namespace="/admin">User Management</my:currentWWUrl>
- </pss:ifAuthorized>
- </li>
- <li>
- <pss:ifAuthorized permission="edit-configuration">
+ <pss:ifAuthorized permission="edit-all-users">
+ <li class="none">
+ <my:currentWWUrl action="userlist" namespace="/security">User Management</my:currentWWUrl>
+ </li>
+ </pss:ifAuthorized>
+ <pss:ifAuthorized permission="edit-configuration">
+ <li class="none">
<my:currentWWUrl action="index" namespace="/admin">Administration</my:currentWWUrl>
- </pss:ifAuthorized>
+
<ul>
<li class="none">
--%>
</ul>
</li>
+ </pss:ifAuthorized>
</pss:ifAnyAuthorized>
</ul>
</pss:ifAnyAuthorized>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="pss" uri="plexusSecuritySystem" %>
+<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
<html>
<head>