Skip to content

Commit

Permalink
setDefaultRoles is deprecated. addPermission from AccessControl.Permi…
Browse files Browse the repository at this point in the history
…ssion is used.
  • Loading branch information
jensens committed Jun 26, 2018
1 parent 3069500 commit c148fb6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plone/app/folder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
from Products.CMFCore.permissions import setDefaultRoles
from AccessControl.Permission import addPermission


packageName = __name__

AddFolder = 'ATContentTypes: Add Folder'
setDefaultRoles(AddFolder, ('Manager', 'Owner'))
addPermission(AddFolder, ('Manager', 'Owner'))


def initialize(context):
Expand All @@ -32,9 +32,9 @@ def initialize(context):
utils.ContentInit(
'%s: %s' % (packageName, atype.portal_type),
content_types=(atype,),
permission = AddFolder,
extra_constructors = (constructor,),
fti = (fti,),
permission=AddFolder,
extra_constructors=(constructor,),
fti=(fti,),
).initialize(context)

from plone.app.folder import nogopip
Expand Down

0 comments on commit c148fb6

Please sign in to comment.