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

All Samples(8045)  |  Call(8045)  |  Derive(0)  |  Import(0)
Declare names to be associated with a permission.

src/p/r/Products.ExternalStorage-0.8.1/Products/ExternalStorage/example/ExternalExample/ExternalImage.py   Products.ExternalStorage(Download)
        },)
 
    security.declareProtected(View, 'index_html')
    def index_html(self, REQUEST=None, RESPONSE=None):
        """Make it directly viewable when entering the objects URL
            return data.index_html(REQUEST, RESPONSE)
 
    security.declareProtected(View, 'tag')
    def tag(self, **kwargs):
        """Generate image tag using the api of the ImageField
        return self.tag()
 
    security.declareProtected(View, 'get_size')
    def get_size(self):
        """ZMI / Plone get size method
        return img.get_size()
 
    security.declareProtected(View, 'getSize')
    def getSize(self, scale=None):
        field = self.getField('image')
        return field.getSize(self, scale=scale)
 
    security.declareProtected(View, 'getWidth')

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/examples/SimpleType.py   Products.Archetypes(Download)
        f.write_permission = TestWrite
 
    security.declareProtected(TestView, 'foo')
    def foo(self):
        return 'bar'

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/examples/SimpleType.py   Products.Archetypes(Download)
        f.write_permission = TestWrite
 
    security.declareProtected(TestView, 'foo')
    def foo(self):
        return 'bar'

src/c/o/Community-Zenpacks-HEAD/ZenPacks.example.Techniques/ZenPacks/example/Techniques/WebServerDevice.py   Community-Zenpacks(Download)
        self.buildRelations()
 
    security.declareProtected(ZEN_MANAGE_DMD, 'manage_addWebSite')
    def manage_addWebSite(self, id, url, REQUEST=None):
        """Add a web site to this web server"""

src/p/r/Products.IssueDealer-0.9.131/Products/IssueDealer/base.py   Products.IssueDealer(Download)
    last_modified_by = None
 
    security.declareProtected(id_permissions.view_issue_dealer, 'search', 'search_advanced',
                              'issue_tree', 'settings', 'filters', 'rdf', 'issue_calendar', 'issue_calendar_past_due')
    security.declareProtected(id_permissions.add_edit_issues_and_relations, 'rename', 'rename_submit', 'issue_multi_add',
	'relation_add', 'locate_issue_javascript', 'change_tags', 'change_tags_submit')
    security.declareProtected(id_permissions.manage_issue_dealer, 'permissions', 'gateways')
    security.declareProtected(id_permissions.publish_issues, 'publish',
        return self.REQUEST.RESPONSE
 
    security.declareProtected(id_permissions.view_issue_dealer, 'get_request')
    def get_request(self):
        ""

src/p/r/Products.IssueDealer-0.9.131/Products/IssueDealerWeblog/local_weblog_publisher.py   Products.IssueDealer(Download)
    security.setDefaultAccess('allow')
 
    security.declareProtected(permissions.publish_issues, 'edit', 'publish',
	'deal', 'edit_style', 'edit_blogroll', 'subscribers', 'render_subscribers')
    security.declarePublic('get_title')
            return self.get_published_issues(start=start, size=size, reverse=1)            
 
    security.declareProtected(permissions.publish_issues, 'publish_issue')
    def publish_issue(self, issue):
        """Publishes the issue to the weblog."""
                self.get_user_preferences().add_message('Sending email to subscribers failed..')
 
    security.declareProtected(permissions.view_issue_dealer, 'get_admin_url')
    def get_admin_url(self):
        """Returns the adminstrator view."""
        return self.absolute_url() + '/deal'
 
    security.declareProtected(permissions.edit_publishers, 'admin_edit')
            REQUEST.RESPONSE.redirect(self.get_admin_url())
 
    security.declareProtected(permissions.edit_publishers, 'admin_edit_blogroll')
    def admin_edit_blogroll(self, blogroll='', REQUEST=None):
        """Edits the blogroll."""

src/p/r/Products.CMFFormController-3.0.3/Products/CMFFormController/ControllerValidator.py   Products.CMFFormController(Download)
    security.declareObjectProtected('View')
 
    security.declareProtected('View', '__call__')
 
    security.declareProtected('View management screens',
      'ZPythonScriptHTML_editForm', 'manage_main', 'read',
      'ZScriptHTML_tryForm', 'PrincipiaSearchSource',
      'document_src', 'params', 'body')
 
    security.declareProtected('Change Python Scripts',

src/p/r/Products.CMFFormController-3.0.3/Products/CMFFormController/ControllerPythonScript.py   Products.CMFFormController(Download)
    security.declareObjectProtected('View')
 
    security.declareProtected('View', '__call__')
 
    security.declareProtected('View management screens',
      'ZPythonScriptHTML_editForm', 'manage_main', 'read',
      'ZScriptHTML_tryForm', 'PrincipiaSearchSource',
      'document_src', 'params', 'body')
 
    security.declareProtected('Change Python Scripts',

src/p/r/Products.ZopeProfiler-2.0.2/Products/ZopeProfiler/ZopeProfiler.py   Products.ZopeProfiler(Download)
 
  security= ClassSecurityInfo()
  security.declareProtected('ZopeProfiler: manage',
                            'manageStatus',
                            'manage_changeProperties',
                            )
 
  security.declareProtected('ZopeProfiler: view',
                            'showStatus',
                            'showHigh', 'showLow',

src/p/r/Products.IssueDealer-0.9.131/Products/IssueDealer/issue.py   Products.IssueDealer(Download)
    security = AccessControl.ClassSecurityInfo()
 
    security.declareProtected(permissions.view_issue_dealer,
      'index_html', 'get_title')
    security.declareProtected(permissions.add_edit_issues_and_relations,
 
    # Untested
    security.declareProtected(permissions.view_issue_dealer, 'render_stx_as_html')
    def render_stx_as_html(self):
        """Renders the contents as reSTX."""
 
    # Untested
    security.declareProtected(permissions.add_edit_issues_and_relations, 'manage_edit')
    def manage_edit(self, title='', contents='', state='open',
                    owners=None, importance=1, file=None,
 
    # Untested
    security.declareProtected(permissions.add_edit_issues_and_relations, 'get_possible_edit_issue_types')
    def get_possible_edit_issue_types(self):
        """Returns a sequence of issue types, depending on what

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next