Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Commit

Permalink
コメント間違ってた所修正
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Oct 30, 2014
1 parent 6d0439f commit fcd9447
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/kawaz/core/comments/perms.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def has_perm(self, user_obj, perm, obj=None):
Object permission:
change: 誰も持たない
delete: 誰も持たない
can_moderate: 指定されたスターがリンクしているオブジェクトの編集権限
があれ、ネルフ権限以上がある、コメントの作者が自分であればTrue
can_moderate: 以下のいずれかの条件を満たす
- ネルフ権限以上がある
- コメントの作者が自分である
- 指定されたコメントがリンクしているオブジェクトの編集権限を持っている
Notice:
django_comments.can_moderateはdjango_comments.Commentが持つパーミッションであり
Expand All @@ -61,7 +63,7 @@ def has_perm(self, user_obj, perm, obj=None):
permissions = ('django_comments.add_comment', 'django_comments.can_moderate',)
if perm in permissions:
if user_obj.is_authenticated() and user_obj.is_member:
# メンバーはスターの付加、moderateが可能
# メンバーはコメントの付加、moderateが可能
return True
return False
# object permission
Expand Down

0 comments on commit fcd9447

Please sign in to comment.