Skip to content

Commit

Permalink
Readme fixed. Pics added.
Browse files Browse the repository at this point in the history
  • Loading branch information
irina-l committed Dec 26, 2014
1 parent 52a41fb commit f1f958b
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 39 deletions.
111 changes: 72 additions & 39 deletions README.md
@@ -1,62 +1,87 @@
# Redmine role replacement plugin
# Redmine Role Replacement Plugin

[![Build Status](https://travis-ci.org/Undev/redmine_role_replacements.png)](https://travis-ci.org/Undev/redmine_role_replacements)
[![Code Climate](https://codeclimate.com/github/Undev/redmine_role_replacements.png)](https://codeclimate.com/github/Undev/redmine_role_replacements)

Redmine plugin for per-project role replacement.
This plugin enables replacement of roles in Redmine projects.

## Compatibility

This plugin is compatible with Redmine 2.x only.

## Installation

1. Copy plugin directory into #{RAILS_ROOT}/plugins.
If you are downloading the plugin directly from GitHub,
you can do so by changing into your plugin directory and issuing a command like
1. To install the plugin
* Download the .ZIP archive, extract files and copy the plugin directory into *#{REDMINE_ROOT}/plugins*.

Or

* Change you current directory to your Redmine root directory:

cd {REDMINE_ROOT}

Copy the plugin from GitHub using the following command:

git clone https://github.com/Undev/redmine_role_replacements.git plugins/redmine_role_replacements

git clone git://github.com/Undev/redmine_role_replacements.git
2. Update the Gemfile.lock file by running the following commands:

2. Run the following command to upgrade your database (make a db backup before).
rm Gemfile.lock
bundle install

3. This plugin requires a migration. Run the following command to upgrade your database (make a database backup before):

rake redmine:plugins:migrate RAILS_ENV=production

3. Restart Redmine
4. Restart Redmine.

Now you should be able to see the plugin in **Administration > Plugins**.

## Usage

The Role Shift plugin adds new project permission "Manage role replacements". This pemission should be enabled for roles which you want to control role shifts. By default only admins can manage project role shifts.
The plugin adds the **Role replacements** section to the **Roles and permissions** tab of the **Administration** menu.
![role replacements](role_replacement_1.PNG)

You can select the **Manage role replacements** check box for the roles which should be allowed to replace roles in the project. By default, **Manage role replacement** is enabled for managers only. We recommend creating a special role for role replacement management.

You also need to enable the "Role Replacements" module for projects you want to configure.
If you have "Manage role replacements" permission you will see new "Role replacements" tab in project.
To replace roles in a project, you should enable the **Role replacements** module in the project settings.
![role replacement module](role_replacement_2.PNG)

Under this tab you can add, edit and remove role replacements for the project.
If you have the **Manage role replacements** permission, you will see a new **Role replacements** tab, where you can add, edit and delete the project role replacement rules.
![role replacements tab](role_replacement_3.PNG)

> For creating a role replacement you need to have a role permissions of which will be used to replace permissions of basic role. It is a good idea to create a special role for this.
To add a role replacement rule, click **New role replacement**.
![add role replacement](role_replacement_4.PNG)

For private projects, prohibits replacement of Anonymous and NonMember roles. For example, you can replace roles of Reporter or Developer, but you can not replace the role of NonMember to Developer.
In private projects, replacement of **Anonymous** and **Non member** roles is prohibited.
![role replacement](role_replacement_5.PNG)

Public projects allow any kind of replacements.
In public projects, all role replacement variants are possible.
![role replacement](role_replacement_6.PNG)

Result of role replacements:
The table below shows all possible role replacement variants and their results:

<table>
<tr>
<th colspan="3"></th>
<th colspan="3">Role after</th>
<th colspan="3">Role After</th>
</tr>
<tr>
<th colspan="3"></th>
<th>Anonymous</th>
<th>NonMember</th>
<th>Non Member</th>
<th>Member</th>
</tr>
<tr>
<th rowspan="6">Role before</th>
<th rowspan="3">Private project</th>
<th rowspan="6">Role Before</th>
<th rowspan="3">Private Project</th>
<th>Anonymous</th>
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
</tr>
<tr>
<th>NonMember</th>
<th>Non Member</th>
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
Expand All @@ -65,38 +90,46 @@ Result of role replacements:
<th>Member</th>
<td>N/A</td>
<td>N/A</td>
<td>LJV</td>
<td>L J V</td>
</tr>
<tr>
<th rowspan="3">Public project</th>
<th rowspan="3">Public Project</th>
<th>Anonymous</th>
<td>N/A</td>
<td>LV</td>
<td>LV</td>
<td>L V</td>
<td>L V</td>
</tr>
<tr>
<th>NonMember</th>
<td>LV</td>
<th>Non Member</th>
<td>L V</td>
<td>N/A</td>
<td>LV</td>
<td>L V</td>
</tr>
<tr>
<th>Member</th>
<td>LJV</td>
<td>LJV</td>
<td>LJV</td>
<td>L J V</td>
<td>L J V</td>
<td>L J V</td>
</tr>
</table>

* N/A - replacement is not valid and don't be applied
* L - project visible in projects list
* J - project visible in jump box
* V - access to project according role_after permissions
* N/A replacement is not valid and cannot be applied
* L — the project is visible in the project list
* J — the project is visible in the **Jump to a project** drop-down list
* V — the project can be accessed according to permissions of the target role (**Role After**)

## Testing
## License

rake redmine:plugins:test NAME=redmine_role_replacements RAILS_ENV=test
Copyright (c) 2014 Undev

## Compatibility
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

This version supports only redmine 2.x. See [redmine-1.x](https://github.com/Undev/redmine_role_replacements/tree/redmine-1.x) branch for Redmine 1.x.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Binary file added role_replacement_1.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added role_replacement_2.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added role_replacement_3.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added role_replacement_4.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added role_replacement_5.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added role_replacement_6.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f1f958b

Please sign in to comment.