equal
deleted
inserted
replaced
96 text.last_text_version.mod_posteriori == True and \ |
96 text.last_text_version.mod_posteriori == True and \ |
97 comment.comment_set.count() != 0 and \ |
97 comment.comment_set.count() != 0 and \ |
98 not has_perm(request, 'can_manage_text', text=text): |
98 not has_perm(request, 'can_manage_text', text=text): |
99 return False |
99 return False |
100 |
100 |
101 return (comment.user == request.user and has_perm(request, perm_name, text=text)) |
101 actual_own_user = False |
|
102 from cm.cm_settings import DECORATED_CREATORS |
|
103 if comment.user == request.user: |
|
104 if DECORATED_CREATORS: |
|
105 if request.GET.get('name', None) == comment.get_name(): |
|
106 actual_own_user = True |
|
107 else: |
|
108 actual_own_user = True |
|
109 return (actual_own_user and has_perm(request, perm_name, text=text)) |
102 |
110 |
103 def is_authenticated(request): |
111 def is_authenticated(request): |
104 # We customize this to be able to monkey patch it if needed |
112 # We customize this to be able to monkey patch it if needed |
105 return request.user.is_authenticated() |
113 return request.user.is_authenticated() |
106 |
114 |