From 6c1a31ffaaddf8ced7c30bf5b1e6e82d66f8c6ee Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Mon, 20 Aug 2018 06:04:01 +0100 Subject: User shouldn't be able to approve or reject his/her own PR (#4729) * Make sure author cannot reject/approve their own PR * Disable buttons in templates too * Remove unneccessary if check since the switch below catches it * Fix IsOwner check * Update template and remove new template variable * Add alert template and redirect to diff page on review failure * Redirect to files diff as a little update to #4632 --- options/locale/locale_en-US.ini | 2 ++ 1 file changed, 2 insertions(+) (limited to 'options/locale') diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 82925e9c0f..4b2b20204f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -814,6 +814,8 @@ issues.dependency.add_error_dep_not_exist = Dependency does not exist. issues.dependency.add_error_dep_exists = Dependency already exists. issues.dependency.add_error_cannot_create_circular = You cannot create a dependency with two issues blocking each other. issues.dependency.add_error_dep_not_same_repo = Both issues must be in the same repository. +issues.review.self.approval = You cannot approve your own pull request. +issues.review.self.rejection = You cannot request changes on your own pull request. issues.review.approve = "approved these changes %s" issues.review.comment = "reviewed %s" issues.review.content.empty = You need to leave a comment indicating the requested change(s). -- cgit v1.2.3