def __call__(self): if not self.available() or not ITTWLockable.providedBy(self.context): return '<html></html>' self.portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state') self.update() return self.index()
def get_lock_info(self): if ITTWLockable.providedBy(self.real_context): info = getMultiAdapter((self.real_context, self.request), name="plone_lock_info") details = info.lock_info() if details: details = details.copy() _type = details.pop('type') details['timeout'] = _type.timeout details['user_unlockable'] = _type.user_unlockable return { 'locked': info.is_locked_for_current_user(), 'stealable': info.lock_is_stealable(), 'details': details }
def allowUnlock(self): """ """ return ITTWLockable.providedBy( self.context) and IStructuralContent.providedBy(self.context)
def __call__(self): if checkPermission("cmf.ModifyPortalContent", self.context) and \ ITTWLockable.providedBy(self.context): viewlet = LockInfoViewlet(self.context, self.request, None, None) return viewlet.render()
def __call__(self): if not ITTWLockable.providedBy(self.context): return viewlet = LockInfoViewlet(self.context, self.request, None, None) return viewlet.render()