Beispiel #1
0
def initialize():
    permissions = {}
    types = atapi.listTypes(config.PROJECTNAME)
    for atype in  types:
        permission = "%s: Add %s" % (config.PROJECTNAME, atype['portal_type'])
        permissions[atype['portal_type']] = permission
        setDefaultRoles(permission, ('Manager','Owner'))

    return permissions
Beispiel #2
0
def wireAddPermissions():
    """Creates a list of add permissions for all types in this project
    
    Must be called **after** all types are registered!
    """
    global permissions
    blog_types = listTypes(PROJECTNAME)
    for btype in blog_types:
        permission = "%s: Add %s" % (PROJECTNAME, btype['portal_type'])
        setDefaultRoles(permission, TYPE_ROLES)
        
        permissions[btype['portal_type']] = permission
    return permissions
Beispiel #3
0
I18N_DOMAIN = 'plonepopoll'
NEEDED_PRODUCTS = ['Archetypes']

# Default permissions for PlonePopoll
PlonePopoll_addPermission  = "Add PlonePopolls"
PlonePopoll_editPermission = "Edit PlonePopoll"
PlonePopoll_votePermission = "Vote for a PlonePopoll"

PERMS_LIST = (
    PlonePopoll_addPermission,
    PlonePopoll_editPermission,
    PlonePopoll_votePermission
)

# Set up default roles for permissions
setDefaultRoles(PlonePopoll_addPermission, ('Manager', 'Owner',))
setDefaultRoles(PlonePopoll_editPermission, ('Manager', 'Owner',))
setDefaultRoles(PlonePopoll_votePermission, ('Manager', 'Owner', 'Member', 'Anonymous'))
    

CONFIGLET_ID = 'plonepopoll_configuration'
# Configlet to manage organisation
prefs_plonepopoll_configlet = {
    'id': CONFIGLET_ID,
    'appId': PROJECTNAME,
    'name': 'PlonePopoll configuration',
    'action': 'string:$portal_url/prefs_PlonePopoll_form',
    'category': 'Products',
    'permission': (ManagePortal, ),
    'imageUrl': 'plonepopoll.gif',
    }
Beispiel #4
0
from Products.CMFCore import CMFCorePermissions
from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Gathering Event Related Permissions into one place
ViewCollector = CMFCorePermissions.View
AddCollector = 'Add portal collector'
ManageCollector = 'Add portal collector'
AddCollectorIssue = 'Add collector issue'
AddCollectorIssueFollowup = 'Add collector issue comment'
EditCollectorIssue = 'Edit collector issue'
SupportIssue = 'Support collector issue'

# Set up default roles for permissions
setDefaultRoles(AddCollector,
                ('Manager', 'Owner'))
setDefaultRoles(ManageCollector,
                ('Manager', 'Owner'))
setDefaultRoles(AddCollectorIssue,
                ('Anonymous', 'Manager', 'Reviewer', 'Owner'))
setDefaultRoles(AddCollectorIssueFollowup,
                ('Manager', 'Reviewer', 'Owner'))
setDefaultRoles(EditCollectorIssue,
                ('Manager', 'Reviewer'))
setDefaultRoles(SupportIssue,
                ('Manager', 'Reviewer'))
Beispiel #5
0
##/code-section config-head


PROJECTNAME = "windowZ"

# Check for Plone 2.1
try:
    from Products.CMFPlone.migrations import v2_1
except ImportError:
    HAS_PLONE21 = False
else:
    HAS_PLONE21 = True

# Permissions
DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner'))
ADD_CONTENT_PERMISSIONS = {
    'Window': 'windowZ: Add Window',
}

setDefaultRoles('windowZ: Add Window', ('Manager','Owner'))

product_globals = globals()

# Dependencies of Products to be installed by quick-installer
# override in custom configuration
DEPENDENCIES = []

# Dependend products - not quick-installed - used in testcase
# override in custom configuration
PRODUCT_DEPENDENCIES = []
Beispiel #6
0
##########################################################################
#                                                                        #
#                copyright (c) 2006 DFKI GmbH, Saarbruecken              #
#             written by: Christian Federmann, [email protected]        #
#                                                                        #
#             This work has been done for the EC Project HUMAINE         #
#	       (IST-507422) -- see http://emotion-research.net.          #
#                                                                        #
##########################################################################

"""
SpeechSynthesisTool permissions
"""

from Products.CMFCore.CMFCorePermissions import setDefaultRoles

from config import PROJECTNAME

MANAGE_CONTENT_PERMISSION = PROJECTNAME + ': Manage Content'
setDefaultRoles(MANAGE_CONTENT_PERMISSION, ('Manager',))
Beispiel #7
0
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
"""EventPermissions: Permissions used in the CMF Events class
$Id$
"""
__version__ = '$Revision$'[11:-2]

from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Gathering Event Related Permissions into one place
AddEvents = 'Add portal events'
ChangeEvents = 'Change portal events'

# Set up default roles for permissions
setDefaultRoles(AddEvents, ('Manager', 'Owner', 'Member'))
setDefaultRoles(ChangeEvents, (
    'Manager',
    'Owner',
))
Beispiel #8
0
##/code-section config-head


PROJECTNAME = "BungeniSkinKE"

# Check for Plone 2.1
try:
    from Products.CMFPlone.migrations import v2_1
except ImportError:
    HAS_PLONE21 = False
else:
    HAS_PLONE21 = True

# Permissions
DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner'))

product_globals = globals()

# Dependencies of Products to be installed by quick-installer
# override in custom configuration
DEPENDENCIES = []

# Dependend products - not quick-installed - used in testcase
# override in custom configuration
PRODUCT_DEPENDENCIES = []

# You can overwrite these two in an AppConfig.py:
# STYLESHEETS = [{'id': 'my_global_stylesheet.css'},
#                {'id': 'my_contenttype.css',
#                 'expression': 'python:object.getTypeInfo().getId() == "MyType"'}]
Author: Ross Reedstrom, Cameron Cooper
(C) 2007 Rice University

This software is subject to the provisions of the GNU Lesser General
Public License Version 2.1 (LGPL).  See LICENSE.txt for details.
"""

from Products.CMFCore.CMFCorePermissions import setDefaultRoles

from AccessControl import allow_module
allow_module('Products.Lensmaker.LensPermissions')

# Permissions
AddQualityLens = 'Add quality lens'
EditHiddenFields = 'Lensmaker: Edit Hidden Fields'
ApproveSelectedContent = 'Lensmaker: Approve Selected Content'
BrandContent = 'Brand content'
PermaBrandContent = 'Permanently brand content'

# Set up default roles for permissions
setDefaultRoles(AddQualityLens, ('Manager', 'Endorser'))
setDefaultRoles(EditHiddenFields, ('Manager',))
setDefaultRoles(ApproveSelectedContent, ('Manager','Owner','Reviewer'))
setDefaultRoles(BrandContent, ('Manager', 'Branding'))
setDefaultRoles(PermaBrandContent, ('PermaBranding'))

# allow some other permissions from Zope
from zExceptions import BadRequest
from OFS.CopySupport import CopyError
Beispiel #10
0
from Products.CMFCore.CMFCorePermissions import setDefaultRoles
from Products.Archetypes.public import listTypes
from Products.SimpleBlog.config import PROJECTNAME

# Add Entry
CROSS_POST_PERMISSION='SimpleBlog: Cross-post'

setDefaultRoles(CROSS_POST_PERMISSION, ( 'Manager', 'Owner' ) )

TYPE_ROLES = ('Manager', 'Owner')

permissions = {}
def wireAddPermissions():
    """Creates a list of add permissions for all types in this project
    
    Must be called **after** all types are registered!
    """
    global permissions
    blog_types = listTypes(PROJECTNAME)
    for btype in blog_types:
        permission = "%s: Add %s" % (PROJECTNAME, btype['portal_type'])
        setDefaultRoles(permission, TYPE_ROLES)
        
        permissions[btype['portal_type']] = permission
    return permissions
Beispiel #11
0
"""
Permissions for RhaptosModuleEditor Product

Author: Brent Hendricks
(C) 2005 Rice University

This software is subject to the provisions of the GNU General
Public License Version 2 (GPL).  See LICENSE.txt for details.
"""

from Products.CMFCore.CMFCorePermissions import setDefaultRoles
# We put these here; refactoring.

# Permissions
AddModuleEditor = 'Add ModuleEditor'
ChangeModuleEditor = 'Change ModuleEditor Content'

# Set up default roles for permissions
setDefaultRoles(AddModuleEditor, ('Manager', 'Owner'))
setDefaultRoles(ChangeModuleEditor, ('Manager', 'Owner', 'Maintainer'))
"""
Permissions for RhaptosModuleEditor Product

Author: Brent Hendricks
(C) 2005 Rice University

This software is subject to the provisions of the GNU General
Public License Version 2 (GPL).  See LICENSE.txt for details.
"""

from Products.CMFCore.CMFCorePermissions import setDefaultRoles
# We put these here; refactoring.

# Permissions
AddModuleEditor = 'Add ModuleEditor'
ChangeModuleEditor = 'Change ModuleEditor Content'

# Set up default roles for permissions
setDefaultRoles(AddModuleEditor, ('Manager', 'Owner'))
setDefaultRoles(ChangeModuleEditor, ('Manager', 'Owner','Maintainer'))

Beispiel #13
0
from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Gathering Event Related Permissions into one place
AddEvents = 'Add portal events'
ChangeEvents = 'Change portal events'

# Set up default roles for permissions
setDefaultRoles(AddEvents, ('Manager', 'Owner', 'Member'))
setDefaultRoles(ChangeEvents, ('Manager', 'Owner',))
Beispiel #14
0
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
""" TopicPermissions: Permissions used throughout CMFTopic.

$Id$
"""

from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Gathering Topic Related Permissions into one place
AddTopics = 'Add portal topics'
ChangeTopics = 'Change portal topics'

# Set up default roles for permissions
setDefaultRoles(AddTopics, ('Manager',))
setDefaultRoles(ChangeTopics, ('Manager', 'Owner',))
Beispiel #15
0
from Products.CMFCore import CMFCorePermissions
from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Gathering Event Related Permissions into one place
ViewCollector = CMFCorePermissions.View
AddCollector = 'Add portal collector'
ManageCollector = 'Add portal collector'
AddCollectorIssue = 'Add collector issue'
AddCollectorIssueFollowup = 'Add collector issue comment'
EditCollectorIssue = 'Edit collector issue'
SupportIssue = 'Support collector issue'

# Set up default roles for permissions
setDefaultRoles(AddCollector, ('Manager', 'Owner'))
setDefaultRoles(ManageCollector, ('Manager', 'Owner'))
setDefaultRoles(AddCollectorIssue,
                ('Anonymous', 'Manager', 'Reviewer', 'Owner'))
setDefaultRoles(AddCollectorIssueFollowup, ('Manager', 'Reviewer', 'Owner'))
setDefaultRoles(EditCollectorIssue, ('Manager', 'Reviewer'))
setDefaultRoles(SupportIssue, ('Manager', 'Reviewer'))
Beispiel #16
0
##/code-section config-head


PROJECTNAME = "BungeniSkinRW"

# Check for Plone 2.1
try:
    from Products.CMFPlone.migrations import v2_1
except ImportError:
    HAS_PLONE21 = False
else:
    HAS_PLONE21 = True

# Permissions
DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ("Manager", "Owner"))

product_globals = globals()

# Dependencies of Products to be installed by quick-installer
# override in custom configuration
DEPENDENCIES = []

# Dependend products - not quick-installed - used in testcase
# override in custom configuration
PRODUCT_DEPENDENCIES = []

# You can overwrite these two in an AppConfig.py:
# STYLESHEETS = [{'id': 'my_global_stylesheet.css'},
#                {'id': 'my_contenttype.css',
#                 'expression': 'python:object.getTypeInfo().getId() == "MyType"'}]
Author: Ross Reedstrom, Cameron Cooper
(C) 2007 Rice University

This software is subject to the provisions of the GNU Lesser General
Public License Version 2.1 (LGPL).  See LICENSE.txt for details.
"""

from Products.CMFCore.CMFCorePermissions import setDefaultRoles

from AccessControl import allow_module
allow_module('Products.Lensmaker.LensPermissions')

# Permissions
AddQualityLens = 'Add quality lens'
EditHiddenFields = 'Lensmaker: Edit Hidden Fields'
ApproveSelectedContent = 'Lensmaker: Approve Selected Content'
BrandContent = 'Brand content'
PermaBrandContent = 'Permanently brand content'

# Set up default roles for permissions
setDefaultRoles(AddQualityLens, ('Manager', 'Endorser'))
setDefaultRoles(EditHiddenFields, ('Manager', ))
setDefaultRoles(ApproveSelectedContent, ('Manager', 'Owner', 'Reviewer'))
setDefaultRoles(BrandContent, ('Manager', 'Branding'))
setDefaultRoles(PermaBrandContent, ('PermaBranding'))

# allow some other permissions from Zope
from zExceptions import BadRequest
from OFS.CopySupport import CopyError
Beispiel #18
0
from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Add Entry
ADD_BLOGENTRY_PERMISSION = 'SimpleBlog: Add BlogEntry'
ADD_SIMPLEBLOG_PERMISSION='SimpleBlog: Add Blog'

setDefaultRoles(ADD_BLOGENTRY_PERMISSION, ( 'Manager', 'Owner' ) )

Beispiel #19
0
# Permissions
from Products.CMFCore.CMFCorePermissions import setDefaultRoles

# Permission for creating new Custom Search objects
ADD_CUSTOM_SEARCH_PERMISSON = "Add Custom Search"

# Permission for performing a search
EXECUTE_CUSTOM_SEARCH_PERMISSION = "Execute Custom Search"

setDefaultRoles( ADD_CUSTOM_SEARCH_PERMISSON, ( 'Manager', ) )
setDefaultRoles( EXECUTE_CUSTOM_SEARCH_PERMISSION, ( 'Anonymous', ) )

Beispiel #20
0
##/code-section config-head


PROJECTNAME = "BungeniSkinTZ"

# Check for Plone 2.1
try:
    from Products.CMFPlone.migrations import v2_1
except ImportError:
    HAS_PLONE21 = False
else:
    HAS_PLONE21 = True

# Permissions
DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner'))

product_globals = globals()

# Dependencies of Products to be installed by quick-installer
# override in custom configuration
DEPENDENCIES = []

# Dependend products - not quick-installed - used in testcase
# override in custom configuration
PRODUCT_DEPENDENCIES = []

# You can overwrite these two in an AppConfig.py:
# STYLESHEETS = [{'id': 'my_global_stylesheet.css'},
#                {'id': 'my_contenttype.css',
#                 'expression': 'python:object.getTypeInfo().getId() == "MyType"'}]
Beispiel #21
0
def addPermission(name):
	#self.manage_addPermission("totoid","toto titre","totoPermission")
	setDefaultRoles(name, ('Manager', 'Owner',))