<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-repository-api</artifactId>
<version>1.2-SNAPSHOT</version>
- <name>Apache Base :: Repository API</name>
+ <name>Archiva Base :: Repository API</name>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
private String repositoryId;
+ private String principal;
+
public MutableResourceContext(ResourceContext context)
{
this.context = context;
return context.getRepositoryId();
}
+ public String getPrincipal()
+ {
+ if (principal != null)
+ {
+ return principal;
+ }
+ return context.getPrincipal();
+ }
+
+ /**
+ * Sets the principal overriding the internal principal value
+ * @param principal
+ */
+ public void setPrincipal(String principal)
+ {
+ this.principal = principal;
+ }
+
/**
* Sets the logicalPath overriding the internal logical path value
* @param logicalPath
* @return
*/
String getRepositoryId();
+
+ /**
+ * Get the principal used for the resource request
+ * @return
+ */
+ String getPrincipal();
}
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-security</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-proxy</artifactId>
</properties>
</configuration>
</component>
+
+ <component>
+ <role>org.codehaus.plexus.redback.system.SecuritySystem</role>
+ <role-hint>default</role-hint>
+ <implementation>org.apache.archiva.web.servlet.BypassSecuritySystem</implementation>
+ </component>
<component>
<role>org.codehaus.plexus.cache.Cache</role>