プロジェクト

全般

プロフィール

Vote #81540

完了

Locked users should not be displayed in the members box of the project overview page

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Projects_11
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
11
version_id:
168
issue_org_id:
35606
author_id:
332
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
165
ステータス-->[Closed]

説明

Before Redmine 4.2.0, members box of the project overview page did not display locked users, but it does in Redmine 4.2.0.

I think it is a bug due to #33174. In the change, the method to list members has been changed from @Project#members@ to @Project#memberships@ to get not only users but also groups. However, @Project#members@ only returns active users but @Project#memberships@ does not check the status of users/groups.


  has_many :memberships, :class_name => 'Member', :inverse_of => :project
  # Memberships of active users only
  has_many :members,
           lambda {joins(:principal).where(:users => {:type => 'User', :status => Principal::STATUS_ACTIVE})}

I think @Project#principals_by_role@ that prepares values for the members box by using @Project#memberships@ should exclude locked users.

Redmine 4.1:
!{width: 600px; border: 1px solid grey;}.4_1.png!

Redmine 4.2:
!{width: 600px; border: 1px solid grey;}.4_2.png!


journals

Although a patch is not yet ready, it should be fixed as soon as possible. Setting the target version to 4.2.2.
--------------------------------------------------------------------------------
Fix to show only active users or groups.
--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリProjects_11 にセット
  • 対象バージョン4.2.2_168 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0