Attachment 'attachfile.patch'

Download

   1  * Allow all users from localhost to access the packaging system.
   2 --- moin--main--1.5/MoinMoin/action/AttachFile.py	2005-12-29 20:52:25.244028800 +0100
   3 +++ moin--local-branch--AlexanderSchremmer/MoinMoin/action/AttachFile.py	2005-12-30 00:18:03.225174400 +0100
   4 @@ -258,7 +258,7 @@
   5                  viewlink = '<a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=view&amp;target=%(urlfile)s">%(label_view)s</a>' % parmdict
   6  
   7              if (packages.ZipPackage(request, os.path.join(attach_dir, file).encode(config.charset)).isPackage() and
   8 -                request.user.name in request.cfg.superuser):
   9 +                (request.user.name in request.cfg.superuser or request.remote_addr == "127.0.0.1")):
  10                  viewlink += ' | <a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=install&amp;target=%(urlfile)s">%(label_install)s</a>' % parmdict
  11              elif (zipfile.is_zipfile(os.path.join(attach_dir,file).encode(config.charset)) and
  12                  request.user.may.read(pagename) and request.user.may.delete(pagename)
  13 @@ -479,7 +479,7 @@
  14           else:
  15              msg = _('You are not allowed to unzip attachments of this page.')
  16      elif request.form['do'][0] == 'install':
  17 -         if request.user.name in request.cfg.superuser:
  18 +         if request.user.name in request.cfg.superuser or request.remote_addr == "127.0.0.1":
  19              install_package(pagename, request)
  20           else:
  21              msg = _('You are not allowed to install files.')

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] (2005-12-30 22:58:42, 1.5 KB) [[attachment:attachfile.patch]]
  • [get | view] (2005-12-30 22:58:48, 1.9 KB) [[attachment:config.patch]]
  • [get | view] (2005-12-30 22:58:06, 1.4 KB) [[attachment:moin.py]]
  • [get | view] (2005-12-30 22:57:45, 4.9 KB) [[attachment:package_desktop.cmd]]
  • [get | view] (2005-12-30 22:58:23, 2.9 KB) [[attachment:setup_py2exe.py]]
  • [get | view] (2005-12-30 22:58:12, 0.2 KB) [[attachment:wikiconfig.py]]
 All files | Selected Files: delete move to page copy to page

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