Non admin users can't modify public queries for all project
non admin users can't modify/suppress public queries howhever the permission is checked in roles configuration.
#1 Updated by Sébastien Pochiero about 5 years ago
- Status changed from New to Resolved
i found the solution in app\models\query.rb :
"Members can not edit public queries that are (only admin is allowed to)"
i replaced the line :
"is_public? && !@is_for_all && user.allowed_to?(:manage_public_queries, project)"
"is_public? && user.allowed_to?(:manage_public_queries, nil, :global => true)"
#4 Updated by Toshi MARUYAMA about 5 years ago
- Status changed from New to Closed
- Target version set to 2.5.3
- Resolution set to Invalid
Source comment says it is intentional.
# 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)
#8 Updated by Jean-Baptiste Barth about 5 years ago
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 ;-)