Defect #9478

User with groups may not see issues assigned to him or to its groups

Added by Igor Zubkov almost 10 years ago. Updated almost 10 years ago.

Status:ClosedStart date:2011-10-26
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Fixed Affected version:

Description

At line source:trunk/app/models/issue.rb#L97

redmine building array with ids for Principals and then use them in building sql:

"(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids}))"

but if it missing .join(', ') and it miss issues which are assigned to user/group if user.groups more then one. b/c, ruby on [1, 2] do .to_s and we have "12", instead "1, 2".

The same for source:trunk/app/models/issue.rb#L100

Patch for revision r7655 attached.

redmine-r7655-issue.patch Magnifier (925 Bytes) Igor Zubkov, 2011-10-26 17:50


Related issues

Duplicated by Redmine - Defect #9400: Private issues are not shown if the user is included in a... Closed 2011-10-10

Associated revisions

Revision 7771
Added by Jean-Philippe Lang almost 10 years ago

Fixed: User with groups may not see issues assigned to him or to its groups (#9478).

History

#1 Updated by Mischa The Evil almost 10 years ago

  • Category set to Issues

#2 Updated by Etienne Massip almost 10 years ago

Could you please describe a buggy user situation?

#3 Updated by Igor Zubkov almost 10 years ago

Etienne Massip wrote:

Could you please describe a buggy user situation?

Sure.

We have:
Two Users, Two Groups and Project. In redmine settings -> Issue tracking -> enable "Allow issue assignment to groups".

First user is in two Groups. Second user create issue and assign to Group (doesn't matter first or second). First user can't see this issue in issue list, but can see know url to go. If First user is only one group, it works, user see issue in issue list.

#4 Updated by Jean-Philippe Lang almost 10 years ago

  • Tracker changed from Patch to Defect
  • Subject changed from Fix building sql for issue to User with groups may not see issues assigned to him or to its groups
  • Status changed from New to Resolved
  • Target version set to 1.2.2
  • Affected version (unused) set to 1.2.1
  • Resolution set to Fixed
  • Affected version set to 1.2.1

Fixed in r7771 with test, thanks for pointing this out.

#5 Updated by Jean-Philippe Lang almost 10 years ago

  • Status changed from Resolved to Closed
  • Target version deleted (1.2.2)
  • Affected version (unused) changed from 1.2.1 to devel
  • Affected version deleted (1.2.1)

Only trunk is affected. Group assignment is not present in 1.2-stable.

Also available in: Atom PDF