SVN Subdirectory right management plugin

68 views
Skip to first unread message

alexander...@qaware.de

unread,
Apr 9, 2015, 5:02:07 AM4/9/15
to scmma...@googlegroups.com
Hey everyone,

we're currently evaluating SCM Manager for internal use. Therefore we want to switch all our existing repositories to use SCM Manager.

We're using advanced rights management for our SVN repositories where we have different rights for different folders in the project structure. I read here that this isn't currently possible with SCM Manager.

Is it planned to add support for that? Moreover: would it be possible with the existing plugin API to build a plugin doing this?

Thanks,
Alexander

alexander...@qaware.de

unread,
Apr 9, 2015, 7:56:24 AM4/9/15
to scmma...@googlegroups.com
Let me add one more detail: Since I found the PathWriteProtect-Plugin now, I want to protect the read of a path. Is that possible?

alexander...@qaware.de

unread,
Apr 9, 2015, 8:06:24 AM4/9/15
to scmma...@googlegroups.com

alexander...@qaware.de

unread,
Apr 10, 2015, 10:21:29 AM4/10/15
to scmma...@googlegroups.com
Hey everyone,

I have got an update:

Since I only have to do this for SVN, I will use this https://davidwinter.me/access-control-for-subversion-with-apache2-and-authz/ for protection on the Apache side.

Because SCM Manager has a Source Viewer, I have to manipulate the SVN-Plugin and the BrowserResult() it returns in browse.json.

Since I didn't really knew how to inject this behaviour, I tried using the existing SVN plugin as base for a new one which implements the read protect. I used version 1.45 of the plugin and built my own plugin (I edited the class names).

But when deploying and testing with the scmp:run goal I ran into this error:

[WARNING] /scm/api/rest/repositories/7jP9SZsEf1/browse.json java.lang.IllegalAccessError: tried to access method sonia.scm.repository.spi.FileBaseCommandRequest.getPath()Ljava/lang/String; from class sonia.scm.repository.spi.SvnqBrowseCommand

Could anyone please provide some help and explain what went wrong? I think somehow there are two versions of the same class included (as explained here: http://stackoverflow.com/questions/7076414/java-lang-illegalaccesserror-tried-to-access-method) but I can't figure out where to look.

My pom.xml file looks like that:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>scm-plugins</artifactId>
<groupId>sonia.scm.plugins</groupId>
<version>1.45</version>
</parent>

<artifactId>scm-restricted-svn-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>Handles SVN</description>

<dependencies>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>sonia.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>${svnkit.version}</version>
<exclusions>
<exclusion>
<artifactId>trilead-ssh2</artifactId>
<groupId>org.tmatesoft.svnkit</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>sonia.svnkit</groupId>
<artifactId>svnkit-dav</artifactId>
<version>${svnkit.version}</version>
</dependency>

<!-- test scope -->

<dependency>
<groupId>sonia.scm</groupId>
<artifactId>scm-test</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<groupId>sonia.scm.maven</groupId>
<artifactId>scm-maven-plugin</artifactId>
<version>${project.parent.version}</version>
<configuration>
<loggginConfiguration>src/main/conf/logging.xml</loggginConfiguration>
</configuration>
</plugin>

</plugins>
</build>

<repositories>

<repository>
<id>maven.scm-manager.org</id>
<name>scm-manager release repository</name>
<url>http://maven.scm-manager.org/nexus/content/groups/public</url>
</repository>

<repository>
<id>maven.tmatesoft.com</id>
<name>tmatesoft release repository</name>
<url>http://maven.tmatesoft.com/content/repositories/releases/</url>
</repository>

</repositories>

</project>

I didn't edit any of the classes in the SVN plugin except I added one or two import statements (but nothing regarding the Commands).

Sebastian Sdorra

unread,
May 17, 2015, 6:26:40 AM5/17/15
to scmma...@googlegroups.com
I think copying the svn-plugin will not work, because it conflicts with the svn core plugin. At the moment scm-manager creates only one classloader, which loads every plugin. This behaviour will change with scm-manager 2.

Sebastian

--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages