From a09a00a08ee97abb5a26461fab2e1cc0091f393b Mon Sep 17 00:00:00 2001 From: Michael Watters Date: Apr 06 2018 22:43:52 +0000 Subject: Ensure that deployment keys are managed correctly Deployment keys were not being added or removed from the gitolite configuration properly. Updated the ui/repo.py class to correct this. --- diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index 3acfa4a..a2a8601 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -1522,7 +1522,7 @@ def remove_deploykey(repo, keyid, username=None, namespace=None): break try: flask.g.session.commit() - pagure.lib.git.generate_gitolite_acls(project=None) + pagure.lib.git.generate_gitolite_acls(project=repo) pagure.lib.create_deploykeys_ssh_keys_on_disk( repo, pagure_config.get('GITOLITE_KEYDIR', None) @@ -1640,7 +1640,7 @@ def add_deploykey(repo, username=None, namespace=None): user=flask.g.fas_user.username, ) flask.g.session.commit() - pagure.lib.git.generate_gitolite_acls(project=None) + pagure.lib.git.generate_gitolite_acls(project=repo) pagure.lib.create_deploykeys_ssh_keys_on_disk( repo, pagure_config.get('GITOLITE_KEYDIR', None)