What it does
This Polarion job creates access rules for each SVN project location based on Polarion project roles.
Access rules are created according to these Polarion roles:
- project_admin
- project_user
- project_developer
- project_assignable
You can configure:
- Automatic execution after each change to project roles
- Public projects (access is granted for any user)
- Ignored projects (no rules are generated)
- Roles for which to deny access
- Additional roles for which to grant access
How to use
- Add the following line at the end of your SVN access file:
[#ROLE_BASED_ACCESS_BEGIN#]
Access rules are added below this line, the lines above remain unchanged.
- Copy the JAR file into your Polarion plugins directory and restart Polarion
- Create a job as described below
Configuration
<job name="RoleBasedAccess.job" id="RoleBasedAccess.job">
<excludeProjects>elibrary</excludeProjects>
<publicProjects>xpone,xptwo</publicProjects>
<autoExecute>2</autoExecute>
<readAccessForPublicProjects></readAccessForPublicProjects>
<readWriteAccessForPublicProjects>@user</readWriteAccessForPublicProjects>
<readAccessForAllProjects></readAccessForAllProjects>
<readWriteAccessForAllProjects>@admin</readWriteAccessForAllProjects>
<denyAccess>@user</denyAccess>
</job>
This is the recommended configuration.
Allowed values for autoExecute:
0 - no automatic execution
1 - trigger job when global roles are changed
2 - trigger job when any roles are changed
Please note that automaticExecution remains active if you restart Polarion. You don't have to re-execute the job.
Sample output
[1] [/XP Demo/xpthree]
[2] @admin = rw
[3] @user =
[4] @xpthree-project_admin = rw
[5] @xpthree-project_user = rw
2: according to readWriteAccessForAllProjects
3: according to denyAccess
3-5: these lines are omitted for public projects
New feature in version 1.1.0
Apply access rules to other SVN locations. Create a folder named rolebasedaccess in the Polarion project folder, create a SVN property rolebasedaccess:linkedlocations for that folder. Add SVN locations as values (one per line), e.g. /Source_Code and access rules will be added for the specified locations according to the Polarion project roles. Only admin and project_admin users will be able to modify the property.
Sample output:
[/XP Demo/xpone]
@admin = rw
@user =
@xpone-project_admin = rw
@xpone-project_user = rw
[/XP Demo/xpone/rolebasedaccess]
@user =
@admin = rw
@xpone-project_admin = rw
[/Other_Stuff]
@admin = rw
@user =
@xpone-project_admin = rw
@xpone-project_user = rw
[/Source_Code]
@admin = rw
@user =
@xpone-project_admin = rw
@xpone-project_user = rw
Additional notes
Developed and tested with Polarion Version 2010 (single repository) on Windows