Modify

Opened 10 years ago

Closed 9 years ago

Last modified 7 years ago

#36 closed defect (fixed)

Small Fix to AddComment.py to enable anonymous comments

Reported by: lalee_net@… Owned by: athomas
Priority: normal Component: AddCommentMacro
Severity: minor Keywords:
Cc: Trac Release:

Description

With Revision 61, the GUI widgets are disabled if the user doesn't have Modify rights. This quick fix re-enables the widgets to allow anonymous comments, without giving "Site Admin" access.

--- AddComment.oob Fri Aug 12 13:20:19 2005 +++ AddComment.py Fri Aug 12 13:20:41 2005 @@ -47,7 +47,8 @@ def execute(hdf, args, env):

comment = re.sub('(|[!])(\[\[AddComment)', '
1\\2', comment)

out = StringIO()

  • if wikipreview or not perm.has_permission('WIKI_MODIFY'):

+ + if wikipreview or not (perm.has_permission('WIKI_MODIFY') or appendonly):

disabled = ' disabled="disabled"'

# If we are submitting or previewing, inject comment as it should look

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by anonymous

D'oh.. let's try that again...

--- AddComment.oob      Fri Aug 12 13:20:19 2005
+++ AddComment.py       Fri Aug 12 13:20:41 2005
@@ -47,7 +47,8 @@ def execute(hdf, args, env):
     comment = re.sub('(^|[^!])(\[\[AddComment)', '\\1!\\2', comment)
 
     out = StringIO()
-    if wikipreview or not perm.has_permission('WIKI_MODIFY'):
+
+    if wikipreview or not (perm.has_permission('WIKI_MODIFY') or appendonly):
         disabled = ' disabled="disabled"'
 
     # If we are submitting or previewing, inject comment as it should look

comment:2 Changed 9 years ago by athomas

  • Resolution set to fixed
  • Status changed from new to closed

(In [112])

  • appendonly now works even if the anonymous user does not have WIKI_MODIFY permissions. Closes #36

Add Comment

Modify Ticket

Action
as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.