[extensions-web] review: Rename "can-review-extensions" to "can-approve-extensions"
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] review: Rename "can-review-extensions" to "can-approve-extensions"
- Date: Sat, 3 Mar 2012 11:16:15 +0000 (UTC)
commit c9d4f9df84da366c0b58b6bc47d5ca1f7d588b3f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 2 22:34:22 2012 -0500
review: Rename "can-review-extensions" to "can-approve-extensions"
Authors can reject and submit reviews for their own extension, so this
permission name isn't quite valid anymore.
sweettooth/review/models.py | 4 ++--
sweettooth/review/views.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/review/models.py b/sweettooth/review/models.py
index 2c49f7e..95040da 100644
--- a/sweettooth/review/models.py
+++ b/sweettooth/review/models.py
@@ -6,7 +6,7 @@ from django.db.models import Q
from extensions.models import ExtensionVersion, STATUSES
def get_all_reviewers():
- perm = Permission.objects.get(codename="can-review-extensions")
+ perm = Permission.objects.get(codename="can-approve-extensions")
# Dark magic to get all the users with a specific permission
# Thanks to <schinckel> in #django
@@ -22,7 +22,7 @@ class CodeReview(models.Model):
class Meta:
permissions = (
- ("can-review-extensions", "Can review extensions"),
+ ("can-approve-extensions", "Can approve extensions"),
)
class ChangeStatusLog(models.Model):
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 574de86..f6f3f23 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -56,13 +56,13 @@ def can_review_extension(user, extension):
if user == extension.creator:
return True
- if user.has_perm("review.can-review-extensions"):
+ if user.has_perm("review.can-approve-extensions"):
return True
return False
def can_approve_extension(user, extension):
- return user.has_perm("review.can-review-extensions")
+ return user.has_perm("review.can-approve-extensions")
def highlight_file(filename, raw, formatter):
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]