Attachment 'ConditionalText.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - Conditional Text macro
   4 
   5     Copyright (c) 2007 by Ruth Ivimey-Cook
   6     
   7     Written with help from Alexander Agibalov's ManageUsers macro.
   8     
   9 """
  10 
  11 import os
  12 from MoinMoin import user, util
  13 
  14 def execute(macro, args):
  15     request=macro.request
  16     data = u''
  17 
  18     if request.user.isSuperUser():
  19         data = args
  20 
  21     dict = request.getDicts()
  22     if dict.has_member(u'MembersGroup', request.user.name):
  23         data = args
  24 
  25     return data

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-05-05 23:05:19, 0.5 KB) [[attachment:ConditionalText.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.