[Moin-user] edit only on ssl

Thomas Waldmann tw-public at gmx.de
Thu May 18 08:01:02 EDT 2006


> Unfortunately I have never written any code in python.

You can change that now. :)

> I changed in my wikiconfig.oy this:
> 
>     class SecurityPolicy(Permissions):
>         def edit(self, pagename, **kw):
>             from MoinMoin import webapi
>             return not request.is_ssl() and Permissions.edit(self,
> pagename, **kw)

Try this (untested):

      class SecurityPolicy(Permissions):
          def write(self, pagename):
              return (self.request.is_ssl
                     and Permissions.write(self, pagename))


This only lets you edit when you use SSL.





More information about the Moin-user mailing list