Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFCore.CookieCrumbler Namespace Reference

Classes

class  CookieCrumbler
class  ResponseCleanup

Functions

def handleCookieCrumblerEvent
def _create_forms
def manage_addCC

Variables

int ATTEMPT_NONE = 0
int ATTEMPT_LOGIN = 1
int ATTEMPT_RESUME = 2
string ModifyCookieCrumblers = 'Modify Cookie Crumblers'
 ViewManagementScreens = Permissions.view_management_screens
tuple manage_addCCForm = HTMLFile('dtml/addCC', globals())

Class Documentation

class CMFCore::CookieCrumbler::CookieCrumblerDisabled
Cookie crumbler should not be used for a certain request.

Definition at line 46 of file CookieCrumbler.py.


Function Documentation

def CMFCore.CookieCrumbler._create_forms (   ob) [private]
Create default forms inside ob 

Definition at line 435 of file CookieCrumbler.py.

00435 
00436 def _create_forms(ob):
00437     ''' Create default forms inside ob '''
00438     import os
00439     from OFS.DTMLMethod import addDTMLMethod
00440     dtmldir = os.path.join(os.path.dirname(__file__), 'dtml')
00441     for fn in ('index_html', 'logged_in', 'logged_out', 'login_form',
00442                 'standard_login_footer', 'standard_login_header'):
00443         filename = os.path.join(dtmldir, fn + '.dtml')
00444         f = open(filename, 'rt')
00445         try: data = f.read()
00446         finally: f.close()
00447         addDTMLMethod(ob, fn, file=data)

Here is the caller graph for this function:

Event subscriber for (un)registering a CC as a before traverse hook.

Definition at line 397 of file CookieCrumbler.py.

00397 
00398 def handleCookieCrumblerEvent(ob, event):
00399     """ Event subscriber for (un)registering a CC as a before traverse hook.
00400     """
00401     if not ICookieCrumbler.providedBy(ob):
00402         return
00403 
00404     if IObjectMovedEvent.providedBy(event):
00405         if event.newParent is not None:
00406             # register before traverse hook
00407             handle = ob.meta_type + '/' + ob.getId()
00408             nc = BeforeTraverse.NameCaller(ob.getId())
00409             BeforeTraverse.registerBeforeTraverse(event.newParent, nc, handle)
00410     elif IObjectWillBeMovedEvent.providedBy(event):
00411         if event.oldParent is not None:
00412             # unregister before traverse hook
00413             handle = ob.meta_type + '/' + ob.getId()
00414             BeforeTraverse.unregisterBeforeTraverse(event.oldParent, handle)

def CMFCore.CookieCrumbler.manage_addCC (   dispatcher,
  id,
  create_forms = 0,
  REQUEST = None 
)

Definition at line 448 of file CookieCrumbler.py.

00448 
00449 def manage_addCC(dispatcher, id, create_forms=0, REQUEST=None):
00450     ' '
00451     ob = CookieCrumbler()
00452     ob.id = id
00453     dispatcher._setObject(ob.getId(), ob)
00454     ob = getattr(dispatcher.this(), ob.getId())
00455     if create_forms:
00456         _create_forms(ob)
00457     if REQUEST is not None:
00458         return dispatcher.manage_main(dispatcher, REQUEST)

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 39 of file CookieCrumbler.py.

Definition at line 38 of file CookieCrumbler.py.

Definition at line 40 of file CookieCrumbler.py.

tuple CMFCore.CookieCrumbler.manage_addCCForm = HTMLFile('dtml/addCC', globals())

Definition at line 432 of file CookieCrumbler.py.

string CMFCore.CookieCrumbler.ModifyCookieCrumblers = 'Modify Cookie Crumblers'

Definition at line 42 of file CookieCrumbler.py.

CMFCore.CookieCrumbler.ViewManagementScreens = Permissions.view_management_screens

Definition at line 43 of file CookieCrumbler.py.