| HelpOnConfiguration/SecurityPolicy |
Logga in! |
| Hörnan | HörnansStartsida | StoraHörnan | SenasteNytt |
|
SecurityPolicy is a config option that allows wiki admins to dynamically enable or disable certain key actions in a MoinMoin wiki, most notably editing and deleting content. MechanicsSecurity restrictions in a MoinMoin wiki work by the interface defined in the MoinMoin.security module. The Permissions class implements the basic interface for user permissions and system policy. If you want to define your own policy, inherit from that base class, so that when new permissions are defined, you get the defaults. Then assign your new class to SecurityPolicy in moin_config; and I mean the class, not an instance of it! SamplesDisable editing over HTTPSThis is used at Add this to your moin_config.py:
# permissions
import MoinMoin.security
class SecurityPolicy(MoinMoin.security.Permissions):
def __init__(self, user):
MoinMoin.security.Permissions.__init__(self, user)
# no edits via https
from MoinMoin import webapi
self.edit = not webapi.isSSL()
self.delete = self.edit
____ 1 An URL that is password-protected, by means of Apache server rules. |