プロジェクト

全般

プロフィール

Vote #70919

完了

Redmine.pm considers all projects private when login_required is enabled

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

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM extra_46
対象バージョン:
開始日:
2011/11/14
期日:
進捗率:

0%

予定工数:
category_id:
46
version_id:
39
issue_org_id:
9566
author_id:
44292
assigned_to_id:
1
comments:
11
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
38
ステータス-->[Closed]

説明

When the "login_required" setting is enabled, Redmine.pm consider all projects as private, which prevents non-member access to public projects.


journals

This should be fixed in r7808. Can you confirm?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
With r7808, providing any login/password always allows reading on public projects, even if the user does not exist or the password is wrong.
--------------------------------------------------------------------------------
Indeed and I've just reverted it. The fix needs more refactoring.
--------------------------------------------------------------------------------
The attached patch should handle the access of non members. Feedback is welcome.
--------------------------------------------------------------------------------
I think "cast(projects.is_public as CHAR) IN ('t', '1')" could be handled as "projects.is_public" since it should be a boolean and I do not know if this SQL is allowed with all RDMBS. ("t" is just how DBI returns PostgreSQL true value.) I will test it with Mysql and maybe Sqlite. By the way, I am not sure how this change would affect the RedmineDbQuery directive.
--------------------------------------------------------------------------------
Guillaume Perréal wrote:
> I think "cast(projects.is_public as CHAR) IN ('t', '1')" could be handled as "projects.is_public" since it should be a boolean

It doesn't work with sqlite3.

> and I do not know if this SQL is allowed with all RDMBS. ("t" is just how DBI returns PostgreSQL true value.) I will test it with Mysql and maybe Sqlite.

It should work with mysql, postgresql and sqlite3.

> By the way, I am not sure how this change would affect the RedmineDbQuery directive.

The members and member_roles are no longer available for additional conditions but I don't think it really makes sense to add custom conditions on these tables.
--------------------------------------------------------------------------------
There is a small typo in the subquery: it selects @member_roles.id@ where it should be @member_roles.role_id@. Once fixed, it behaves as expected: I tested it with roles manager, reviever and non-member for reading and writing access.
--------------------------------------------------------------------------------
Fixed patch applied, thanks for the feedback.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

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

  • カテゴリSCM extra_46 にセット
  • 対象バージョン1.2.3_39 にセット

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

いいね!0
いいね!0