From 72b11691cb2c4b832ef80619862b70c09f1c6722 Mon Sep 17 00:00:00 2001 From: smit thakkar Date: Feb 19 2017 04:11:16 +0000 Subject: [PATCH 1/2] Merge branch 'master' of ssh://pagure.io/pagure --- diff --git a/pagure/forms.py b/pagure/forms.py index 1e88704..f175f8f 100644 --- a/pagure/forms.py +++ b/pagure/forms.py @@ -99,6 +99,7 @@ def file_virus_validator(form, field): def ssh_key_validator(form, field): + ''' Form for ssh key validation ''' if not pagure.lib.are_valid_ssh_keys(field.data): raise wtforms.ValidationError('Invalid SSH keys') From 452302f9425573142722d029a3c4739d523ea1ec Mon Sep 17 00:00:00 2001 From: smit thakkar Date: Feb 22 2017 11:12:52 +0000 Subject: [PATCH 2/2] Changed the success response to "You cannot unwatch your own fork" in a case when user tries to unwatch his own fork Fixed: https://pagure.io/pagure/issue/1812 --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 9211850..43290b7 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3425,6 +3425,9 @@ def update_watch_status(session, project, user, watch): ''' user_obj = get_user(session, user) + if project.user_id == user_obj.id: + return 'You cannot Unwatch your own fork.' + if not user_obj: raise pagure.exceptions.PagureException( 'No user with username: %s' % user)