Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)
Declare default roles for a permission

src/p/r/Products.Bitakora-1.1/Products/Bitakora/Bitakora.py   Products.Bitakora(Download)
    security.setDefaultAccess('allow')
 
    security.setPermissionDefault('Manage Bitakora', ('Blogger', 'Manager',))
    security.setPermissionDefault('Add Bitakora Comment',
                                  ('Anonymous', 'Manager',))

src/z/o/Zope2-2.13.22/src/OFS/ObjectManager.py   Zope2(Download)
    security = ClassSecurityInfo()
    security.declareObjectProtected(access_contents_information)
    security.setPermissionDefault(access_contents_information,
                                  ('Anonymous', 'Manager'))
 

src/z/o/Zope-HEAD/src/OFS/ObjectManager.py   Zope(Download)
    security = ClassSecurityInfo()
    security.declareObjectProtected(access_contents_information)
    security.setPermissionDefault(access_contents_information,
                                  ('Anonymous', 'Manager'))
 

src/p/r/Products.ParsedXML-1.5.1/Products/ParsedXML/ParsedXML.py   Products.ParsedXML(Download)
                      Cacheable.manage_options)
 
    security.setPermissionDefault('Edit ParsedXML', ['Manager'])
 
    security.declareProtected('Edit ParsedXML',

src/p/r/Products.ParsedXML-1.5.1/Products/ParsedXML/ManageableDOM.py   Products.ParsedXML(Download)
class DOMManageable(DOMIO, DOMPublishable, App.Management.Tabs):
    "Mixin class for DOM classes to provide Zope management interfaces."
 
    security = ClassSecurityInfo()
    security.setPermissionDefault('View DOM hierarchy', ['Manager'])

src/p/r/Products.FacultyStaffDirectory-3.1.3/Products/FacultyStaffDirectory/FacultyStaffDirectory.py   Products.FacultyStaffDirectory(Download)
 
    # Make this permission show up on every containery object in the Zope instance. This is a Good Thing, because it easy to factor up permissions. The Zope Developer's Guide says to put this here, not in the install procedure (http://www.zope.org/Documentation/Books/ZDG/current/Security.stx). This is because it isn't "sticky", in the sense of being persisted through the ZODB. Thus, it has to run every time Zope starts up. Thus, when you uninstall the product, the permission doesn't stop showing up, but when you actually remove it from the Products folder, it does.
    security.setPermissionDefault('FacultyStaffDirectory: Add or Remove People', ['Manager', 'Owner'])
 
    # moved schema setting after finalizeATCTSchema, so the order of the fieldsets

src/i/s/IssueTrackerProduct-0.14.2/IssueTrackerProduct/IssueTracker.py   IssueTrackerProduct(Download)
    security = ClassSecurityInfo()
 
    security.setPermissionDefault(AddIssuesPermission,
                                  (IssueTrackerManagerRole, IssueTrackerUserRole,
                                   'Anonymous', 'Owner', 'Manager'))

src/i/s/IssueTrackerProduct-HEAD/IssueTrackerProduct/IssueTracker.py   IssueTrackerProduct(Download)
    security = ClassSecurityInfo()
 
    security.setPermissionDefault(AddIssuesPermission,
                                  (IssueTrackerManagerRole, IssueTrackerUserRole,
                                   'Anonymous', 'Owner', 'Manager'))

src/z/o/Zope2-2.13.22/src/webdav/Resource.py   Zope2(Download)
 
    security = ClassSecurityInfo()
    security.setPermissionDefault(webdav_access, ('Authenticated', 'Manager'))
 
    def dav__init(self, request, response):

src/p/r/Products.Bitakora-1.1/Products/Bitakora/BitakoraCommunity.py   Products.Bitakora(Download)
 
    security = ClassSecurityInfo()
    security.setPermissionDefault('Manage BitakoraCommunity', ('Manager', ))
 
    _properties = ({'id': 'admin_mail', 'type': 'ustring', 'mode': 'w'},

  1 | 2  Next