From 66df5bc9f1939a196580ff7b9278ba7f2f727611 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Mar 15 2016 10:26:48 +0000 Subject: allow owners of a repo to fork the repo Removes the check to see if an owner is trying to fork a repo, as we want to allow this now. Also changes the repos_master template so the fork button is presented to the owners as well. --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index b7cff50..2288385 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1272,10 +1272,6 @@ def fork_project(session, user, repo, gitfolder, reponame = os.path.join(gitfolder, repo.path) forkreponame = '%s.git' % os.path.join(forkfolder, user, repo.name) - if repo.user.user == user: - raise pagure.exceptions.RepoExistsException( - 'You may not fork your own repo') - if os.path.exists(forkreponame): raise pagure.exceptions.RepoExistsException( 'Repo "%s/%s" already exists' % (user, repo.name)) diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html index 247c2c6..00e46f9 100644 --- a/pagure/templates/repo_master.html +++ b/pagure/templates/repo_master.html @@ -12,7 +12,7 @@ {% if repo.is_fork %}{% endif %}{{ repo.fullname }} - {% if authenticated and not repo_admin and not repo.is_fork %} + {% if authenticated and not repo.is_fork %}