From 427a745184d1b1b38ac045f6e86295e3e2b1e60a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 08:53:41 +0000 Subject: Check that repository module is enabled (#24307). git-svn-id: http://svn.redmine.org/redmine/trunk@16286 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- extra/svn/Redmine.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/svn/Redmine.pm b/extra/svn/Redmine.pm index c3e74d3ab..2652ceae1 100644 --- a/extra/svn/Redmine.pm +++ b/extra/svn/Redmine.pm @@ -244,6 +244,7 @@ sub RedmineDSN { WHERE users.login=? AND projects.identifier=? + AND EXISTS (SELECT 1 FROM enabled_modules em WHERE em.project_id = projects.id AND em.name = 'repository') AND users.type='User' AND users.status=1 AND ( @@ -390,7 +391,9 @@ sub is_public_project { my $dbh = connect_database($r); my $sth = $dbh->prepare( - "SELECT is_public FROM projects WHERE projects.identifier = ? AND projects.status <> 9;" + "SELECT is_public FROM projects + WHERE projects.identifier = ? AND projects.status <> 9 + AND EXISTS (SELECT 1 FROM enabled_modules em WHERE em.project_id = projects.id AND em.name = 'repository');" ); $sth->execute($project_id); -- cgit v1.2.3