Patch #25154

Allow non-administrator users to copy certain projects

Added by Nick Vanpraet over 2 years ago. Updated 5 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Projects
Target version:-

Description

Currently only administrators can copy projects, which is not ideal because Project Managers should be able to create, edit and copy projects but not have full access to everything else. The copying is important, because certain projects are used as templates and are only ever copied to speed everything up.

Attached is a patch which removes the :copy from the require_admin before_filter and instead adds its own method to determine copy access. This method essentially checks if the user can edit the project, and if so grants access to copy. The patch also adds a button to copy a project to the contextual links area when viewing a project if the current user can edit the project.

Button:

I realize this patch is incomplete (I don't use translatable labels for the button and I should ideally create a new permission instead of using "edit") but this is as far as my current knowledge can take me. In the mean time I hope this patch is a good jumping off point for either other developers or core developers to use for further improvements.

patch.separate_copy_permission.patch Magnifier (2.34 KB) Nick Vanpraet, 2017-02-22 14:31

new-copy-button.png (15.7 KB) Nick Vanpraet, 2017-02-22 14:32

project_copy.patch Magnifier (2.23 KB) Charlie Savage, 2019-06-22 01:04


Related issues

Related to Redmine - Feature #4687: Add copy project permission New 2010-01-29

History

#1 Updated by Nick Vanpraet over 2 years ago

Note: this patch is for Redmine version 3.3.2-stable

#2 Updated by Mischa The Evil over 2 years ago

  • Tracker changed from Feature to Patch
  • Subject changed from As non-administrator I'd like to be able to copy certain projects to Allow non-administrator users to copy certain projects

#3 Updated by Mischa The Evil over 2 years ago

#4 Updated by Anders Thomsen about 1 year ago

Duped by #18835

#5 Updated by Charlie Savage 5 days ago

Updated patch for Redmine 4.0.3

Also available in: Atom PDF