Project

General

Profile

Actions

Defect #17669

closed

Non admin users can't modify public queries for all project

Defect #17669: Non admin users can't modify public queries for all project

Added by Sébastien Pochiero over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Projects
Target version:
-
Resolution:
Invalid
Affected version:

Description

non admin users can't modify/suppress public queries howhever the permission is checked in roles configuration.


Related issues 2 (0 open — 2 closed)

Related to Redmine - Defect #14239: Error 403 when trying to edit custom queryClosedActions
Related to Redmine - Defect #28264: Global and public custom queries are shown as editable to non administrators in projectsClosedJean-Philippe LangActions

Updated by Sébastien Pochiero about 12 years ago Actions #1

  • Status changed from New to Resolved

i found the solution in app\models\query.rb :
"Members can not edit public queries that are for all project (only admin is allowed to)"

i replaced the line :
"is_public? && @is_for_all && user.allowed_to?(:manage_public_queries, project)"
by :
"is_public? && user.allowed_to?(:manage_public_queries, nil, :global => true)"

Updated by Toshi MARUYAMA about 12 years ago Actions #2

  • Status changed from Resolved to New
  • Target version set to 2.5.3

Updated by Toshi MARUYAMA about 12 years ago Actions #3

  • Target version deleted (2.5.3)

Updated by Toshi MARUYAMA about 12 years ago Actions #4

  • Status changed from New to Closed
  • Target version set to 2.5.3
  • Resolution set to Invalid

Source comment says it is intentional.
source:tags/2.5.2/app/models/query.rb#L271

    # Members can not edit public queries that are for all project (only admin is allowed to)
    is_public? && !@is_for_all && user.allowed_to?(:manage_public_queries, project)

Updated by Toshi MARUYAMA about 12 years ago Actions #5

  • Subject changed from Can't modify public reports for non admin users. to Can't modify public queries for non admin users.

Updated by Toshi MARUYAMA about 12 years ago Actions #6

  • Target version deleted (2.5.3)

Updated by Toshi MARUYAMA about 12 years ago Actions #7

  • Subject changed from Can't modify public queries for non admin users. to Non admin users can't modify public queries for all project

Updated by Jean-Baptiste Barth about 12 years ago Actions #8

If I understand correctly, you'd like a user who only has rights on Project A to manage a public query that is also used by Project B ? If so I don't think this is a good idea in the general case, and I'm OK with the actual default behaviour. If you really need this maybe you could make a simple plugin or keep the local patch you found. If I don't understand the request correctly, please correct me ;-)

Updated by Toshi MARUYAMA about 12 years ago Actions #9

  • Related to Defect #14239: Error 403 when trying to edit custom query added

Updated by Marius BĂLTEANU over 8 years ago Actions #10

  • Related to Defect #28264: Global and public custom queries are shown as editable to non administrators in projects added
Actions

Also available in: PDF Atom