Project

General

Profile

Actions

Patch #34643

closed

Cleanups and fixes after Wiki tab removal from project settings (#26579)

Added by Mischa The Evil almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This is a series of patches that includes cleanups, fixes and improvements after the Wiki tab was removed from the project settings per #26579:

  • 1. Remove 'edit' action from :manage_wiki permission definition in Redmine::AccessControl.
    Wikis#edit is removed by r17018.
  • 2. Redirect_to project_path after WikisController#destroy.
    • Project settings 'wiki' tab is removed by r16917 & r17017.
    • This action is executed outside the project settings scope after r16916, thus we can better redirect to project_path.
  • 3. Set :wiki menu_item for WikisController#destroy.
    This action is executed inside the project wiki scope after r16916, thus we can better set the menu_item accordingly.
  • 4. Disable the wiki module after deletion of a project wiki.
    By adding a (private) after_destroy :disable_wiki_module callback that disables the wiki module after deletion of a project wiki, we prevent the need to explicitly have to disable the wiki module first, before (re-)enabling the module would eventually create a new project wiki and reset the start_page.
  • 5. Changed wiki :start_page name to I18n'ed :field_start_page within EnabledModule#module_enabled.
    This prevents a default 'projectid/wiki/Wiki' URL for the project wiki start page.
    The test assertion is updated to reflect this change and the containing test is adjusted to handle the i18n'ed text. Code formatting is adjusted whenever code was touched anyways.

This patch series, against source:/trunk@20729, is produced using git format-patch which makes it apply-able using "patch -p1 < 0001-...".

Environment:

Environment:
  Redmine version                4.1.1.devel@r20729
  Ruby version                   2.5.8-p224 (2020-03-31) [x64-mingw32]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                test
SCM:
  Git                            2.26.0
  Filesystem                     
Redmine plugins:
  no plugin installed


Files


Related issues

Related to Redmine - Defect #34634: Deletion of project wiki leaves the project wiki inaccessible (404) until module reactivationClosedMarius BĂLTEANU

Actions
Follows Redmine - Feature #26579: Project settings : remove Wiki tabClosedJean-Philippe Lang

Actions
Copied to Redmine - Patch #35610: Cleanups after Wiki tab removal from project settings (#26579)ClosedMarius BĂLTEANU

Actions
Actions

Also available in: Atom PDF