[extensions-web] All superusers can approve their own extensions
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] All superusers can approve their own extensions
- Date: Mon, 24 Oct 2011 23:28:20 +0000 (UTC)
commit 58677154b2601e564fc0b3787251e81e0fd62f13
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Oct 24 19:19:50 2011 -0400
All superusers can approve their own extensions
sweettooth/review/views.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 10ea14c..dd88a9e 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -44,6 +44,9 @@ 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]