Skip to content

Commit

Permalink
housekeeping - steps to get rid of plone.app.widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Mar 28, 2019
1 parent e6c66f2 commit 7612ce0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plone/app/z3cform/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,10 @@
for="z3c.form.interfaces.ITextWidget
plone.app.z3cform.interfaces.IPloneFormLayer"/>

<utility
name="ZPublisher.HTTPRequest.FileUpload"
provides="plone.namedfile.interfaces.IStorage"
factory=".factories.Zope2FileUploadStorable"
/>

</configure>
Empty file added plone/app/z3cform/factories.py
Empty file.
14 changes: 14 additions & 0 deletions plone/app/z3cform/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from z3c.form.interfaces import ISelectWidget as IBaseSelectWidget
from z3c.form.interfaces import ISingleCheckBoxWidget
from z3c.form.interfaces import ITextWidget
from zope.interface import Interface
from zope.schema.interfaces import IDate
from zope.schema.interfaces import IDatetime

Expand All @@ -12,6 +13,19 @@ class IPloneFormLayer(IFormLayer):
"""Request layer installed via browserlayer.xml"""


class IFieldPermissionChecker(Interface):
"""Adapter factory for checking whether a user has permission to
edit a specific field on a content object.
"""

def validate(field_name, vocabulary_name=None):
"""Returns True if the current user has permission to edit the
`field_name` field. Returns False if the user does not have
permission. Raises and AttributeError if the field cannot be
found.
"""


class IDateField(IDate):
"""Marker interface for the DateField."""

Expand Down

1 comment on commit 7612ce0

@jenkins-plone-org

This comment was marked as outdated.

Please sign in to comment.