コード例 #1
0
class IContainerViews(Interface):
    """Define several container views for an `IContainer` implementation."""

    for_ = GlobalObject(title=u"The declaration this containerViews are for.",
                        description=u"""
        The containerViews will be available for all objects that
        provide this declaration.
        """,
                        required=True)

    contents = Permission(title=u"The permission needed for content page.",
                          required=False)

    index = Permission(title=u"The permission needed for index page.",
                       required=False)

    add = Permission(title=u"The permission needed for add page.",
                     required=False)

    layer = GlobalInterface(
        title=_("The layer the view is in."),
        description=_("""A skin is composed of layers. It is common to put
        skin specific views in a layer named after the skin. If the 'layer'
        attribute is not supplied, it defaults to 'default'."""),
        required=False)
コード例 #2
0
ファイル: meta.py プロジェクト: sixfeetup/plone.tiles
class ITileDirective(Interface):
    """Directive which registers a new type of tile
    """

    name = schema.DottedName(
        title=u"Name",
        description=u"A unique, dotted name for the tile",
    )

    title = MessageID(
        title=u"Title",
        description=u"A user friendly title, used when configuring the tile",
        required=False)

    description = MessageID(
        title=u"Description",
        description=u"A longer summary of the tile's purpose and function",
        required=False)

    icon = MessageID(
        title=u"Icon",
        description=u"Image that represents tile purpose and function",
        required=False)

    add_permission = Permission(
        title=u"Add permission",
        description=u"Name of the permission required to instantiate "
        u"this tile",
        required=False,
    )

    schema = GlobalInterface(
        title=u"Configuration schema for the tile",
        description=u"This is used to create standard add/edit forms",
        required=False,
    )

    for_ = GlobalObject(
        title=u"The interface or class this tile is available for",
        required=False,
    )

    layer = GlobalInterface(title=u"The layer the tile is available for",
                            required=False)

    class_ = GlobalObject(title=u"Class",
                          description=u"Class implementing this tile",
                          required=False)

    template = Path(
        title=u"The name of a template that renders this tile",
        description=u"Refers to a file containing a page template",
        required=False,
    )

    permission = Permission(
        title=u"View permission",
        description=u"Name of the permission required to view this item",
        required=False,
    )
コード例 #3
0
class IMenuItemsDirective(Interface):
    """
    Define a group of browser menu items

    This directive is useful when many menu items are defined for the
    same interface and menu.
    """

    menu = MenuField(
        title=u"Menu name",
        description=u"The (name of the) menu the items are defined for",
        required=True,
    )

    for_ = GlobalObject(
        title=u"Interface",
        description=u"The interface the menu items are defined for",
        required=True)

    layer = GlobalInterface(
        title=u"Layer",
        description=u"The Layer for which the item is declared.",
        required=False)

    permission = Permission(title=u"The permission needed access the item",
                            description=u"""
        This can usually be inferred by the system, however, doing so
        may be expensive. When displaying a menu, the system tries to
        traverse to the URLs given in each action to determine whether
        the url is accessible to the current user. This can be
        avoided if the permission is given explicitly.""",
                            required=False)
コード例 #4
0
class ITraverser(Interface):
    for_ = GlobalInterface(
        title=u"The interface this traverser is for.",
        required=True,
    )

    type = GlobalInterface(
        title=u"Request type",
        required=True,
    )

    factory = GlobalObject(
        title=u"The pluggable traverser implementation.",
        required=True,
    )

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to use the view.",
        required=False,
    )

    provides = GlobalInterface(
        title=u"Interface the component provides",
        required=False,
    )
コード例 #5
0
class IBasicComponentInformation(Interface):

    component = GlobalObject(
        title=_("Component to use"),
        description=_("Python name of the implementation object.  This"
                      " must identify an object in a module using the"
                      " full dotted name.  If specified, the"
                      " ``factory`` field must be left blank."),
        required=False,
    )

    permission = Permission(
        title=_("Permission"),
        description=_("Permission required to use this component."),
        required=False,
    )

    factory = GlobalObject(
        title=_("Factory"),
        description=_("Python name of a factory which can create the"
                      " implementation object.  This must identify an"
                      " object in a module using the full dotted name."
                      " If specified, the ``component`` field must"
                      " be left blank."),
        required=False,
    )
コード例 #6
0
ファイル: metadirectives.py プロジェクト: l1ph0x/schooltool-2
class IDescribeAction(Interface):

    group = DescGroupId(
        title=u"Group name",
        description=u"Identifier of the group this action belongs to.")

    name = DescActionId(
        title=u"Name",
        description=u"Unique identifier of the action within the group.")

    order = schema.Int(
        title=u"Order",
        description=u"Order in which this action should be displayed.",
        required=False)

    interface = fields.GlobalObject(title=u"Interface", required=True)

    permission = Permission(title=u"Permission", required=True)

    title = fields.MessageID(title=u"Title", required=False)

    description = fields.MessageID(title=u"Description", required=False)

    klass = fields.GlobalObject(title=u"Class",
                                description=u"""
        Action definition class that builds it's own title/description.
        This is an alternative to title/description defined in ZCML.
        """,
                                required=False)
コード例 #7
0
ファイル: metaconfigure.py プロジェクト: witsch/Zope
class IFiveViewDirective(IViewDirective):

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to use the view.",
        required=False,
    )
コード例 #8
0
ファイル: zcml.py プロジェクト: Andyvs/TrackMonthlyExpenses
class IBasicViewInformation(zope.interface.Interface):
    """This is the basic information for all views."""

    for_ = zope.configuration.fields.Tokens(
        title=_("Specifications of the objects to be viewed"),
        description=_("""This should be a list of interfaces or classes
        """),
        required=True,
        value_type=zope.configuration.fields.GlobalObject(
          missing_value=object(),
          ),
        )

    permission = Permission(
        title=_("Permission"),
        description=_("The permission needed to use the view."),
        required=False,
        )

    class_ = zope.configuration.fields.GlobalObject(
        title=_("Class"),
        description=_("A class that provides attributes used by the view."),
        required=False,
        )

    layer = zope.configuration.fields.GlobalInterface(
        title=_("The layer the view is in."),
        description=_("""
        A skin is composed of layers. It is common to put skin
        specific views in a layer named after the skin. If the 'layer'
        attribute is not supplied, it defaults to 'default'."""),
        required=False,
        )

    allowed_interface = zope.configuration.fields.Tokens(
        title=_("Interface that is also allowed if user has permission."),
        description=_("""
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying this attribute, you can
        make the permission also apply to everything described in the
        supplied interface.

        Multiple interfaces can be provided, separated by
        whitespace."""),
        required=False,
        value_type=zope.configuration.fields.GlobalInterface(),
        )

    allowed_attributes = zope.configuration.fields.Tokens(
        title=_("View attributes that are also allowed if the user"
                " has permission."),
        description=_("""
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying 'allowed_attributes',
        you can make the permission also apply to the extra attributes
        on the view object."""),
        required=False,
        value_type=zope.configuration.fields.PythonIdentifier(),
        )
コード例 #9
0
class ICommonInformation(Interface):
    """
    Common information for all successive directives
    """

    name = TextLine(
        title=u"Name",
        description=u"The name of the generated view.",
        required=True
        )

    schema = GlobalInterface(
        title=u"Schema",
        description=u"The schema from which the form is generated.",
        required=True
        )

    for_ = GlobalInterface(
        title=u"Interface",
        description=u"""
        The interface this page (view) applies to.

        The view will be for all objects that implement this
        interface. The schema is used if the for attribute is not
        specified.

        If the for attribute is specified, then the objects views must
        implement or be adaptable to the schema.""",
        required=False
        )

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to use the view.",
        required=True
        )

    layer = GlobalInterface(
        title=u"Layer",
        description=u"The later the view is in. Default: 'default'",
        required=False
        )

    template = Path(
        title=u"Template",
        description=u"An alternate template to use for the form.",
        required=False
        )

    class_ = GlobalObject(
        title=u"Class",
        description=u"""
        A class to provide custom widget definitions or methods to be
        used by a custom template.

        This class is used as a mix-in class. As a result, it needn't
        subclass any special classes, such as BrowserView.""",
        required=False
        )
コード例 #10
0
class IService(Interface):
    """ """

    method = TextLine(
        title=u"The name of the view that should be the default. " +
        u"[get|post|put|delete]",
        description=u"""
        This name refers to view that should be the view used by
        default (if no view name is supplied explicitly).""",
    )

    accept = TextLine(
        title=u"Acceptable media types",
        description=u"""Specifies the media type used for content negotiation.
        The service is limited to the given media type and only called if the
        request contains an "Accept" header with the given media type. Multiple
        media types can be given by separating them with a comma.""",
        default=u"application/json",
    )

    for_ = GlobalObject(
        title=u"The interface this view is the default for.",
        description=u"""Specifies the interface for which the view is
        registered. All objects implementing this interface can make use of
        this view. If this attribute is not specified, the view is available
        for all objects.""",
    )

    factory = GlobalObject(
        title=u"The factory for this service",
        description=u"The factory is usually subclass of the Service class.",
    )

    name = TextLine(
        title=u"The name of the service.",
        description=u"""When no name is defined, the service is available at
        the object's absolute URL. When defining a name, the service is
        available at the object's absolute URL appended with a slash and the
        service name.""",
        required=False,
        default=u"",
    )

    layer = GlobalInterface(
        title=u"The browser layer for which this service is registered.",
        description=u"""Useful for overriding existing services or for making
                        services available only if a specific add-on has been
                        installed.""",
        required=False,
        default=IDefaultBrowserLayer,
    )

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to access the service.",
        required=True,
    )
コード例 #11
0
class IMenuItem(Interface):
    """Common menu item configuration
    """

    title = MessageID(
        title=_u("Title"),
        description=_u("The text to be displayed for the menu item"),
        required=True)

    description = MessageID(title=_u("A longer explanation of the menu item"),
                            description=_u("""
        A UI may display this with the item or display it when the
        user requests more assistance."""),
                            required=False)

    icon = TextLine(
        title=_u("Icon Path"),
        description=_u(
            "Path to the icon resource representing this menu item."),
        required=False)

    permission = Permission(title=_u("The permission needed access the item"),
                            description=_u("""
        This can usually be inferred by the system, however, doing so
        may be expensive. When displaying a menu, the system tries to
        traverse to the URLs given in each action to determine whether
        the url is accessible to the current user. This can be
        avoided if the permission is given explicitly."""),
                            required=False)

    filter = TextLine(title=_u("A condition for displaying the menu item"),
                      description=_u("""
        The condition is given as a TALES expression. The expression
        has access to the variables:

        context -- The object the menu is being displayed for

        request -- The browser request

        nothing -- None

        The menu item will not be displayed if there is a filter and
        the filter evaluates to a false value."""),
                      required=False)

    order = Int(
        title=_u("Order"),
        description=_u("A relative position of the menu item in the menu."),
        required=False,
        default=0)

    item_class = GlobalObject(title=_u("Menu item class"),
                              description=_u("""
        A class to be used as a factory for creating menu item"""),
                              required=False)
コード例 #12
0
ファイル: metadirectives.py プロジェクト: l1ph0x/schooltool-2
class IAllowDirective(Interface):

    interface = fields.GlobalObject(title=u"Interface",
                                    required=False,
                                    description=u"An interface of the object")

    crowds = fields.Tokens(title=u"Crowds",
                           value_type=CrowdId(title=u"Crowd"),
                           required=True)

    permission = Permission(title=u"Permission", required=True)
コード例 #13
0
ファイル: zcml.py プロジェクト: miltondehara/mejorando
class IBasicViewInformation(Interface):
    """This is the basic information for all views."""

    for_ = Tokens(
        title=_("Specifications of the objects to be viewed"),
        description=_("""This should be a list of interfaces or classes
        """),
        required=True,
        value_type=GlobalObject(
          missing_value=object(),
          ),
        )

    permission = Permission(
        title=_("Permission"),
        description=_("The permission needed to use the view."),
        required=False,
        )

    class_ = GlobalObject(
        title=_("Class"),
        description=_("A class that provides attributes used by the view."),
        required=False,
        )

    allowed_interface = Tokens(
        title=_("Interface that is also allowed if user has permission."),
        description=_("""
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying this attribute, you can
        make the permission also apply to everything described in the
        supplied interface.

        Multiple interfaces can be provided, separated by
        whitespace."""),
        required=False,
        value_type=GlobalInterface(),
        )

    allowed_attributes = Tokens(
        title=_("View attributes that are also allowed if the user"
                " has permission."),
        description=_("""
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying 'allowed_attributes',
        you can make the permission also apply to the extra attributes
        on the view object."""),
        required=False,
        value_type=PythonIdentifier(),
        )
コード例 #14
0
ファイル: zcml.py プロジェクト: mleist/ict-ok.org
class IAdmUtilSnmpdDirective(Interface):
    """This abstract directive describes a generic mail delivery utility
    registration."""

    name = TextLine(
        title=u"Name",
        description=u'Specifies the Name of the snmpd utility. '\
                    u'The default is "Snmpd".',
        default=u"Snmpd",
        required=False)

    permission = Permission(
        title=u"Permission",
        description=u"Defines the permission needed to use this service.",
        required=True)
コード例 #15
0
class IPagesDirective(IBasicViewInformation):
    """
    Define multiple pages without repeating all of the parameters.

    The pages directive allows multiple page views to be defined
    without repeating the 'for', 'permission', 'class', 'layer',
    'allowed_attributes', and 'allowed_interface' attributes.
    """

    for_ = GlobalObject(title=u"The interface or class this view is for.",
                        required=False)

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to use the view.",
        required=True)
コード例 #16
0
class IBasicResourceInformation(Interface):
    """
    This is the basic information for all browser resources.
    """

    layer = GlobalInterface(title=u"The layer the resource should be found in",
                            description=u"""
        For information on layers, see the documentation for the skin
        directive. Defaults to "default".""",
                            required=False)

    permission = Permission(
        title=u"The permission needed to access the resource.",
        description=u"""
        If a permission isn't specified, the resource will always be
        accessible.""",
        required=False)
コード例 #17
0
class IStaticSubscriptionDirective(Interface):
    """
    Define a global, static, transient subscription.

    Static subscriptions are not persistent and live only in the
    memory of individual processes. Thus, failed deliveries cannot be
    re-attempted after process shutdown. And of course the delivery history
    is also transient and local to a process.
    """

    for_ = GlobalObject(
        title=IWebhookSubscription['for_'].title,
        description=IWebhookSubscription['for_'].description,
        default=IWebhookSubscription['for_'].default,
        required=False,
    )

    when = ObjectEventInterface(
        title=IWebhookSubscription['when'].title,
        description=IWebhookSubscription['when'].description,
        default=IWebhookSubscription['when'].default,
        required=False,
    )

    to = IWebhookSubscription['to'].bind(None)

    dialect = TextLine(
        # We can't use the field directly because it wants to validate
        # against a Choice using a vocabulary based on registered utilities.
        # That doesn't work as an argument if we're still registering those
        # utilities.
        title=IWebhookSubscription['dialect_id'].title,
        description=IWebhookSubscription['dialect_id'].description,
        default=IWebhookSubscription['dialect_id'].default,
        required=False)

    owner = IWebhookSubscription['owner_id'].bind(None)

    permission = Permission(title=u"The permission to check",
                            description=u"""
        If given, and an *owner* is also specified, then only data that
        has this permission for the *owner* will result in an attempted delivery.
        If not given, but an *owner* is given, this will default to the standard
        view permission ID, ``zope.View``.
        """,
                            required=False)
コード例 #18
0
ファイル: metadirectives.py プロジェクト: py361/zope.security
class IRequire(Interface):
    """Require a permission to access selected module attributes

    The given permission is required to access any names provided
    directly in the attributes attribute or any names defined by
    interfaces listed in the interface attribute.
    """

    attributes = Tokens(
        title=u"Attributes",
        description=u"The attributes to require permission for.",
        value_type=PythonIdentifier(),
        required=False)

    permission = Permission(
        title=u"Permission ID",
        description=u"The ID of the permission to require.")
コード例 #19
0
class IDeliveryDirective(Interface):
    """This abstract directive describes a generic mail delivery utility
    registration."""

    name = TextLine(
        title=u"Name",
        description=u'Specifies the Delivery name of the mail utility. '\
                    u'The default is "Mail".',
        default=u"Mail",
        required=False)

    mailer = TextLine(
        title=u"Mailer",
        description=u"Defines the mailer to be used for sending mail.",
        required=True)

    permission = Permission(
        title=u"Permission",
        description=u"Defines the permission needed to use this service.",
        required=False)
コード例 #20
0
class ITraverserPluginBase(Interface):

    for_ = GlobalObject(
        title=u"The interface this plugin is for.",
        required=True,
    )

    layer = GlobalObject(
        title=u"The layer the plugin is declared for",
        required=False,
    )

    name = TextLine(
        title=u"The name the traverser will be traversing into.",
        required=False,
    )

    permission = Permission(
        title=u"Permission",
        required=False,
    )
コード例 #21
0
class INaayaSimpleViewDirective(Interface):
    """ Define a simple zope3 view """
    for_ = GlobalInterface(
        title=u"The interface this view is for.",
        required=True,
    )
    name = TextLine(
        title=u"The name of the view.",
        description=u"The name shows up in URLs/paths. For example 'foo'.",
        required=True,
    )
    handler = GlobalObject(
        title=_("Handler"),
        description=_("Function that handles the view."),
        required=True,
    )
    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to use the view.",
        required=False,
    )
コード例 #22
0
class IComponentDirective(interface.Interface):
    """Register a component to be used by articles
    """

    name = PythonIdentifier(
        title=u'Name',
        description=u"",
        required=True)

    component = GlobalObject(
        title=u'Component',
        description=u'',
        required=True)

    viewlet = GlobalObject(
        title=u'Viewlet',
        description=u'',
        required=True)

    manager = GlobalObject(
        title=u'Viewlet manager',
        description=u'',
        required=True)

    selection = GlobalObject(
        title=u'ComponentSelection',
        description=u'For which object this component may be selected.',
        default=None,
        required=False)

    image = Path(
        title=u'Image',
        description=u"If not specified the one set in the component is registered.",
        required=False)

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to view the viewlet.",
        default='zope.Public',
        required=True)
コード例 #23
0
ファイル: metadirectives.py プロジェクト: tseaver/Zope-RFA
class IRegisterClassDirective(Interface):
    """registerClass directive schema.

    Register content with Zope 2.
    """

    class_ = GlobalObject(
        title=u'Instance Class',
        description=u'Dotted name of the class that is registered.',
        required=True)

    meta_type = ASCII(
        title=u'Meta Type',
        description=u'A human readable unique identifier for the class.',
        required=True)

    permission = Permission(
        title=u'Add Permission',
        description=u'The permission for adding objects of this class.',
        required=True)

    addview = ASCII(
        title=u'Add View ID',
        description=u'The ID of the add view used in the ZMI. Consider this '
        u'required unless you know exactly what you do.',
        default=None,
        required=False)

    icon = ASCII(title=u'Icon ID',
                 description=u'The ID of the icon used in the ZMI.',
                 default=None,
                 required=False)

    global_ = Bool(
        title=u'Global scope?',
        description=u'If "global" is False the class is only available in '
        u'containers that explicitly allow one of its interfaces.',
        default=True,
        required=False)
コード例 #24
0
class IAdapterDirective(Interface):
    """
    Register an adapter
    """

    factory = Tokens(title=_("Adapter factory/factories"),
                     description=_(
                         "A list of factories (usually just one) that create"
                         " the adapter instance."),
                     required=True,
                     value_type=GlobalObject())

    provides = GlobalInterface(
        title=_("Interface the component provides"),
        description=_("This attribute specifies the interface the adapter"
                      " instance must provide."),
        required=False,
    )

    for_ = Tokens(
        title=_("Specifications to be adapted"),
        description=_("This should be a list of interfaces or classes"),
        required=False,
        value_type=GlobalObject(missing_value=object(), ),
    )

    permission = Permission(
        title=_("Permission"),
        description=_("This adapter is only available, if the principal"
                      " has this permission."),
        required=False,
    )

    name = TextLine(
        title=_("Name"),
        description=_("Adapters can have names.\n\n"
                      "This attribute allows you to specify the name for"
                      " this adapter."),
        required=False,
    )

    trusted = Bool(
        title=_("Trusted"),
        description=_("""Make the adapter a trusted adapter

        Trusted adapters have unfettered access to the objects they
        adapt.  If asked to adapt security-proxied objects, then,
        rather than getting an unproxied adapter of security-proxied
        objects, you get a security-proxied adapter of unproxied
        objects.
        """),
        required=False,
        default=False,
    )

    locate = Bool(
        title=_("Locate"),
        description=_("""Make the adapter a locatable adapter

        Located adapter should be used if a non-public permission
        is used.
        """),
        required=False,
        default=False,
    )
コード例 #25
0
class ISubscriberDirective(Interface):
    """
    Register a subscriber
    """

    factory = GlobalObject(
        title=_("Subscriber factory"),
        description=_("A factory used to create the subscriber instance."),
        required=False,
    )

    handler = GlobalObject(
        title=_("Handler"),
        description=_("A callable object that handles events."),
        required=False,
    )

    provides = GlobalInterface(
        title=_("Interface the component provides"),
        description=_("This attribute specifies the interface the adapter"
                      " instance must provide."),
        required=False,
    )

    for_ = Tokens(
        title=_("Interfaces or classes that this subscriber depends on"),
        description=_("This should be a list of interfaces or classes"),
        required=False,
        value_type=GlobalObject(missing_value=object(), ),
    )

    permission = Permission(
        title=_("Permission"),
        description=_("This subscriber is only available, if the"
                      " principal has this permission."),
        required=False,
    )

    trusted = Bool(
        title=_("Trusted"),
        description=_("""Make the subscriber a trusted subscriber

        Trusted subscribers have unfettered access to the objects they
        adapt.  If asked to adapt security-proxied objects, then,
        rather than getting an unproxied subscriber of security-proxied
        objects, you get a security-proxied subscriber of unproxied
        objects.
        """),
        required=False,
        default=False,
    )

    locate = Bool(
        title=_("Locate"),
        description=_("""Make the subscriber a locatable subscriber

        Located subscribers should be used if a non-public permission
        is used.
        """),
        required=False,
        default=False,
    )
コード例 #26
0
class IContentProvider(Interface):
    """A directive to register a simple content provider.

    Content providers are registered by their context (`for` attribute), the
    request (`layer` attribute) and the view (`view` attribute). They also
    must provide a name, so that they can be found using the TALES
    ``provider`` namespace. Other than that, content providers are just like
    any other views.
    """

    view = zope.configuration.fields.GlobalObject(
        title=_("The view the content provider is registered for."),
        description=_("The view can either be an interface or a class. By "
                      "default the provider is registered for all views, "
                      "the most common case."),
        required=False,
        default=browser.IBrowserView)

    name = zope.schema.TextLine(
        title=_("The name of the content provider."),
        description=_("The name of the content provider is used in the TALES "
                      "``provider`` namespace to look up the content "
                      "provider."),
        required=True)

    for_ = zope.configuration.fields.GlobalObject(
        title=u"The interface or class this view is for.", required=False)

    permission = Permission(
        title=u"Permission",
        description=u"The permission needed to use the view.",
        required=True)

    class_ = zope.configuration.fields.GlobalObject(
        title=_("Class"),
        description=_("A class that provides attributes used by the view."),
        required=False,
    )

    layer = zope.configuration.fields.GlobalInterface(
        title=_("The layer the view is in."),
        description=_("""
        A skin is composed of layers. It is common to put skin
        specific views in a layer named after the skin. If the 'layer'
        attribute is not supplied, it defaults to 'default'."""),
        required=False,
    )

    allowed_interface = zope.configuration.fields.Tokens(
        title=_("Interface that is also allowed if user has permission."),
        description=_("""
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying this attribute, you can
        make the permission also apply to everything described in the
        supplied interface.

        Multiple interfaces can be provided, separated by
        whitespace."""),
        required=False,
        value_type=zope.configuration.fields.GlobalInterface(),
    )

    allowed_attributes = zope.configuration.fields.Tokens(
        title=_("View attributes that are also allowed if the user"
                " has permission."),
        description=_("""
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying 'allowed_attributes',
        you can make the permission also apply to the extra attributes
        on the view object."""),
        required=False,
        value_type=zope.configuration.fields.PythonIdentifier(),
    )