Defect #20282

Error message when editing a child project without add project/subprojects permissions

Added by James H almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Project settings
Target version:3.0.6
Resolution:Fixed Affected version:3.0.3

Description

If a user whose role permissions excludes the ability to "create subprojects" tries to edit the project settings of a project that is a sub-project of another project, it does not allow you to make any changes and states that "Subproject of is invalid"

subprojecterror.png (24.4 KB) James H, 2015-07-09 20:59


Related issues

Duplicated by Redmine - Defect #21168: Cannot save project when associated with a parent project. Closed
Duplicated by Redmine - Defect #25146: Issue while modifying subproject configuration without th... Closed

Associated revisions

Revision 14619
Added by Jean-Philippe Lang over 2 years ago

Error message when editing a child project without add project/subprojects permissions (#20282).

History

#1 Updated by Mischa The Evil almost 3 years ago

  • Status changed from New to Confirmed

Summary

I have been able to replicate the display of the error message using source:/trunk@14420, but I should also note that the changes made are actually being saved to the DB, despite the error message.
The error message can be triggered only by editing of and saving from "/projects/child-20282/settings" and "/projects/child-20282/settings/info".

Details

Project setup

/--------------\
| Parent-20282 |                    <<-- private root project on which role "20282" has no roles/permissions
\--------------/                         (project does not have any members)
       ||
       ||
       \\        /-------------\
         == >>>  | Child-20282 |    <<-- private sub project on which user "tester1" has role "20282" 
                 \-------------/         (no further members)

User setup

  • Login: "tester1"
  • Made sure that this user is not an "Administrator"

Role setup

  • Name: "20282"
  • Created by copying the default "Reporter" role
  • Added all project management permissions:
    • "Edit project"
    • "Select project modules"
    • "Manage members"
    • "Manage versions"
    • "Manage forums"
    • "Manage issue categories"
    • "Manage repository"
    • "Manage project activities"
    • "Manage wiki"
  • Made sure that the role does not have the "Create subprojects" permission

Steps to replicate the error message

  1. login as "tester1"
  2. browse to project settings of "Child-20282" ("/projects/child-20282/settings")
    1. notice that "tester1" can browse further directly to any of the sub tabs:
      - Modules, Members, Versions, Issue categories, Wiki, Repositories, Forums and Activities (time tracking)
      and modify any of these and save the changes correctly to the DB without the error message showing up
  3. make any kind of change (eg. disable/enable a tracker, add/modify "Homepage" field, etc) on "Information tab"
  4. click "Save" --> page is reloaded
  • notice that the reported error message is shown: "Subproject of is invalid"
  • notice that the changes made are actually being saved to the DB
  • notice that no errors/warnings are being logged

Deployment details

Environment:
  Redmine version                3.1.0.devel (trunk@r14420)
  OS                             Ubuntu 12.04.5 LTS
  Ruby and Gemset manager        rvm 1.26.11 (master@20150627)
  Ruby version                   2.1.6-p336 (2015-04-13) [i686-linux]
  Rails version                  4.2.3
  Environment                    development
  Database                       PostgreSQL 9.1.18 on i686-pc-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 32-bit
  Database adapter               pg 0.18.2
  Application server             n/a
  Webserver                      WEBrick 1.3.1
SCM:
  Subversion                     1.6.17
  Git                            1.7.9.5
  Filesystem
Redmine plugins:
  no plugin installed

Log snippets

#2 Updated by James H almost 3 years ago

interesting, i did not notice that it was still being written.
Thank you for looking into this.

#3 Updated by Toshi MARUYAMA almost 3 years ago

  • Target version set to 3.2.0

#4 Updated by Sebastian Paluch almost 3 years ago

This seems to be related also to the number of projects user can choose from to set subproject.

In our case the error came up for a user that has project administrator role (including creating subprojects) for one project (B) only:

Project A
 - Project B 

It seems that in this case the subproject drop down list is not generated at all - user cannot change subproject so drop down list is empty and missing.

#5 Updated by Jean-Philippe Lang over 2 years ago

  • Subject changed from Cannot Change Project Settings on a Sub-Project if User Role is not permitted to create Sub-Projects. to Error message when editing a child project without add project/subprojects permissions
  • Status changed from Confirmed to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version changed from 3.2.0 to 2.6.8
  • Resolution set to Fixed

Mischa, thanks for this detailed report. This is fixed in r14619.

#6 Updated by James H over 2 years ago

Awesome, thanks guys

#7 Updated by Jean-Philippe Lang over 2 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 2.6.8 to 3.0.6

#8 Updated by Toshi MARUYAMA over 2 years ago

  • Duplicated by Defect #21168: Cannot save project when associated with a parent project. added

#9 Updated by Mischa The Evil over 1 year ago

  • Duplicated by Defect #25146: Issue while modifying subproject configuration without the permission to create a subproject added

Also available in: Atom PDF