[Checkins] SVN: grok/trunk/src/grok/interfaces.py add interface
entries for the two security-related directives theuni and I added
Philipp von Weitershausen
philikon at philikon.de
Mon Jan 8 20:22:30 EST 2007
Log message for revision 71839:
add interface entries for the two security-related directives theuni and I added
during the sprint
Changed:
U grok/trunk/src/grok/interfaces.py
-=-
Modified: grok/trunk/src/grok/interfaces.py
===================================================================
--- grok/trunk/src/grok/interfaces.py 2007-01-08 23:40:10 UTC (rev 71838)
+++ grok/trunk/src/grok/interfaces.py 2007-01-09 01:22:24 UTC (rev 71839)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2006-2007 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -81,8 +81,8 @@
``templatedir``."""
def provides(interface):
- """Explicitly specify with which interface a component will be looked up.
- """
+ """Explicitly specify with which interface a component will be
+ looked up."""
def baseclass():
"""Mark this class as a base class.
@@ -114,6 +114,18 @@
name_in_container - the name to use for storing the utility
"""
+ def define_permission(permission):
+ """Defines a new permission with the id ``permission``."""
+
+ def require(permission):
+ """Protect a view class or an XMLRPC method with ``permision``.
+
+ ``permission`` already be define, e.g. using
+ grok.define_permission.
+
+ grok.require can be used as a class-level directive or as a
+ method decorator."""
+
class IGrokDecorators(interface.Interface):
def subscribe(*classes_or_interfaces):
@@ -203,5 +215,3 @@
If both object and name arguments are supplied, construct
URL to obj/name.
"""
-
-
More information about the Checkins
mailing list