Project

General

Profile

Actions

Defect #20282

closed

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

Added by James H over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Project settings
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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"


Files

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

Related issues

Has duplicate Redmine - Defect #21168: Cannot save project when associated with a parent project.Closed

Actions
Has duplicate Redmine - Defect #25146: Issue while modifying subproject configuration without the permission to create a subprojectClosed

Actions
Actions #1

Updated by Mischa The Evil over 9 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

View development log snippets...

Actions #2

Updated by James H over 9 years ago

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

Actions #3

Updated by Toshi MARUYAMA over 9 years ago

  • Target version set to 3.2.0
Actions #4

Updated by Sebastian Paluch over 9 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.

Actions #5

Updated by Jean-Philippe Lang about 9 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.

Actions #6

Updated by James H about 9 years ago

Awesome, thanks guys

Actions #7

Updated by Jean-Philippe Lang about 9 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 2.6.8 to 3.0.6
Actions #8

Updated by Toshi MARUYAMA about 9 years ago

  • Has duplicate Defect #21168: Cannot save project when associated with a parent project. added
Actions #9

Updated by Mischa The Evil almost 8 years ago

  • Has duplicate Defect #25146: Issue while modifying subproject configuration without the permission to create a subproject added
Actions

Also available in: Atom PDF