Back to index

plone3  3.1.7
Public Member Functions
plone.app.iterate.browser.control.Control Class Reference
Inheritance diagram for plone.app.iterate.browser.control.Control:
Inheritance graph
[legend]
Collaboration diagram for plone.app.iterate.browser.control.Control:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def checkin_allowed
def checkout_allowed
def cancel_allowed

Detailed Description

Information about whether iterate can operate.

This is a public view, referenced in action condition expressions.

Definition at line 34 of file control.py.


Member Function Documentation

Check to see if the user can cancel the checkout on the given working copy

Definition at line 95 of file control.py.

00095 
00096     def cancel_allowed(self):
00097         """Check to see if the user can cancel the checkout on the given working copy
00098         """
        return self.checkin_allowed()

Here is the call graph for this function:

Check if a checkin is allowed

Definition at line 41 of file control.py.

00041 
00042     def checkin_allowed(self):
00043         """Check if a checkin is allowed
00044         """
00045         context = aq_inner(self.context)
00046         
00047         if not interfaces.IIterateAware.providedBy(context):
00048             return False
00049     
00050         if not getSecurityManager().checkPermission(permissions.CheckinPermission, context):
00051             return False
00052         
00053         if not IReferenceable.providedBy(context):
00054             return False
00055 
00056         archiver = interfaces.IObjectArchiver(context)
00057         if not archiver.isVersionable():
00058             return False
00059 
00060         # check to see it is checkout
00061         if not len(context.getReferences(WorkingCopyRelation.relationship)) > 0:
00062             return False
00063         
00064         return True
        

Here is the call graph for this function:

Here is the caller graph for this function:

Check if a checkout is allowed.

Definition at line 66 of file control.py.

00066 
00067     def checkout_allowed(self):
00068         """Check if a checkout is allowed.
00069         """
00070         context = aq_inner(self.context)
00071         
00072         if not interfaces.IIterateAware.providedBy(context):
00073             return False
00074         
00075         if not getSecurityManager().checkPermission(permissions.CheckoutPermission, context):
00076             return False
00077 
00078         if not IReferenceable.providedBy(context):
00079             return False
00080 
00081         archiver = interfaces.IObjectArchiver(context)
00082         if not archiver.isVersionable():
00083             return False
00084 
00085         # check if there is an existing checkout
00086         if len(context.getBRefs(WorkingCopyRelation.relationship)) > 0:
00087             return False
00088         
00089         # check if its is a checkout
00090         if len(context.getRefs(WorkingCopyRelation.relationship)) > 0:
00091             return False
00092         
00093         return True
        

Here is the call graph for this function:


The documentation for this class was generated from the following file: