プロジェクト

全般

プロフィール

Vote #75524

未完了

Subrepositories Fail to Authenticate Internal Users upon Subversion Checkout

Admin Redmine さんが約4年前に追加. 約4年前に更新.

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

0%

予定工数:
category_id:
46
version_id:
0
issue_org_id:
17748
author_id:
41186
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

  • DBMS: PostgreSQL 8.4.20
  • Ruby 1.9.3p547
  • Rails 3.2.13
  • Redmine 2.2.4.stable.11981

We have setup Apache 2.2.5 to host subversion repositories created in our local directory "/var/svn/". We can browse these repositories through Redmine just fine. However, when an internal Redmine user tries to checkout a secondary repository using a local "svn checkout" command, they would fail to authenticate against any of these secondary repositories of a given project of which they are a member.

We tracked down the issue and found it to be located in the "Redmine.pm" file, located at

/extra/svn/Redmine.pm

If we look at Line 246 (http://www.redmine.org/projects/redmine/repository/entry/trunk/extra/svn/Redmine.pm#L246), we are only gathering repository permission for a project whose identifier matches the repository identifier. This is bad in at least two cases:

If the repository is named something different than the project identifier (such as project identifier is "myproject" but the repository is at "/var/svn/myproj")

If we have secondary repositories which of course would have a different identifier than the project's identifier

To fix this, we need to modifiy line 246 to include any repository identifer or where the repository's URL matches:

 AND (projects.identifier=?
 OR projects.id IN (SELECT project_id FROM repositories WHERE identifier = ?)
 OR projects.id IN (SELECT project_id FROM repositories WHERE url LIKE '%/'||?)
 )

Of course, we'll also need to pass in the project identifier another two times when the Perl string is compiled upon execution, which happens on line 461 (or 464 with the added code above):

$sth->execute($redmine_user, $project_id, $project_id, $project_id);

I hope this is a good solution for anyone having the same issues out there, and hope that this (or an adaptation of this) is included in some future release!


journals

--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリSCM extra_46 にセット

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

いいね!0
いいね!0