Skip to content

Commit

Permalink
Initialized project and added permission Add portal content
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunga001 committed Nov 22, 2023
1 parent 5df2ed1 commit f9ad7a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/bika/reports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import logging

from zope.i18nmessageid import MessageFactory
from zope.i18nmessageid import MessageFactory
from Products.Archetypes.atapi import listTypes
from Products.Archetypes.atapi import process_types
Expand Down Expand Up @@ -31,7 +30,7 @@ def initialize(context):
allTypes = zip(content_types, constructors)
for atype, constructor in allTypes:
kind = "%s: Add %s" % (PROJECTNAME, atype.portal_type)
perm_name = "Add{}".format(atype.portal_type)
perm_name = "Add portal content"
perm = getattr(permissions, perm_name, AddPortalContent)
ContentInit(kind,
content_types=(atype,),
Expand Down
3 changes: 3 additions & 0 deletions src/bika/reports/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:five="http://namespaces.zope.org/five"
i18n_domain="bika.reports">

<i18n:registerTranslations directory="locales" />

<five:registerPackage package="." initialize=".initialize" />

<!--
Be careful if you use general includeDependencies, it can have side effects!
Better import explicit packages or configurations ;)
Expand Down

0 comments on commit f9ad7a0

Please sign in to comment.