Delete project plugin
Added by Anthony Paul almost 2 years ago
Hi all,
I wrote a plugin which adds an ACL to allow non-admin users to delete their projects.
Note that until you configure the settings, this plugin won't actually delete any project.
http://www.redmine.org/wiki/redmine/Plugin_List#Delete-Project-plugin
- First of all, unarchive the .tar.gz file in ${REDMINE_ROOT}/vendor/plugins/
- Restart Redmine
- As an admin, check the box "Delete project" in Roles & Permissions (ie for the Manager profile)
- Still as an admin, in the plugin info page, click "configure" in front of "Delete project", then you could set different settings:
- Really delete the project from the database or set a special status (default is 1001)
- Make a 'chmod 000' on the repository (tested only with SVN under Linux)
Tested with Redmine 0.9.3, packaged version for Debian Squeeze (testing).
Replies (4)
RE: Delete project plugin - Added by Luis Serrano Aranda 10 months ago
I think it is better modify the 16 line in the delete project controller
from
res= Project.find_by_sql("SELECT * FROM projects WHERE parent_id=#{project_id}")
to
res= Project.find_by_sql("SELECT * FROM projects WHERE (parent_id=#{project_id} and status!=1001)")
Whit this option is it possible "delete-hidden" project with "deleted-hiddens" subprojects
RE: Delete project plugin - Added by Luis Serrano Aranda 10 months ago
It's better add this lines
from
res= Project.find_by_sql("SELECT * FROM projects WHERE parent_id=#{project_id}")
to
status_number= Setting['plugin_redmine_delete_project']['status_number'].to_i
res= Project.find_by_sql("SELECT * FROM projects WHERE (parent_id=#{project_id} and status!=#{status_number})")
RE: Delete project plugin - Added by Anthony Paul 10 months ago
Hello Luis, and thank you for the feedback,
I totally didn't think about this (sorry!) so I really appreciate your notice.
I have patched this plugin which is now on version 0.0.4 and available here:
http://anthony.perso.info.unicaen.fr/redmine_delete_project/redmine_delete_project.tar.gz
Thanks!!
PS: I thank you in a commented line of the controller, so if you want I remove your name, let me know...
RE: Delete project plugin - Added by Robert Mavrinac 5 days ago
In config/locales/*.yml:
{{ok}} should be %{ok}
and
{{dead_project}} should be %{dead_project}
(1-4/4)