[extensions-web] review: Loosen up the permissions on approving extensions
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] review: Loosen up the permissions on approving extensions
- Date: Sat, 3 Mar 2012 11:16:10 +0000 (UTC)
commit 17972f881b0868bc9cef920cc54d67ca8fc4c1cb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 2 22:31:47 2012 -0500
review: Loosen up the permissions on approving extensions
Now, anybody with the can-review-extensions permission can approve
extensions. Before, the logic was a bit twisty, so let's clean it up.
sweettooth/review/views.py | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index cfff106..574de86 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -62,13 +62,7 @@ def can_review_extension(user, extension):
return False
def can_approve_extension(user, extension):
- if user.is_superuser:
- return True
-
- if user.has_perm("review.can-review-extensions"):
- return user != extension.creator
-
- return False
+ return user.has_perm("review.can-review-extensions")
def highlight_file(filename, raw, formatter):
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]