| @@ 61-73 (lines=13) @@ | ||
| 58 | return self.getInstrument().absolute_url_path() |
|
| 59 | return None |
|
| 60 | ||
| 61 | def getObjectWorkflowStates(self): |
|
| 62 | """ |
|
| 63 | This method is used as a metacolumn. |
|
| 64 | Returns a dictionary with the workflow id as key and workflow state as |
|
| 65 | value. |
|
| 66 | :returns: {'review_state':'active',...} |
|
| 67 | """ |
|
| 68 | workflow = getToolByName(self, 'portal_workflow') |
|
| 69 | states = {} |
|
| 70 | for w in workflow.getWorkflowsFor(self): |
|
| 71 | state = w._getWorkflowStateOf(self).id |
|
| 72 | states[w.state_var] = state |
|
| 73 | return states |
|
| 74 | ||
| 75 | ||
| 76 | # Activating the content type in Archetypes' internal types registry |
|
| @@ 232-243 (lines=12) @@ | ||
| 229 | return self.portal_membership.getMemberById( |
|
| 230 | self.getUsername()) is not None |
|
| 231 | ||
| 232 | def getObjectWorkflowStates(self): |
|
| 233 | """ |
|
| 234 | Returns a dictionary with the workflow id as key and workflow state as |
|
| 235 | value. |
|
| 236 | :returns: {'review_state':'active',...} |
|
| 237 | """ |
|
| 238 | workflow = getToolByName(self, 'portal_workflow') |
|
| 239 | states = {} |
|
| 240 | for w in workflow.getWorkflowsFor(self): |
|
| 241 | state = w._getWorkflowStateOf(self).id |
|
| 242 | states[w.state_var] = state |
|
| 243 | return states |
|
| 244 | ||
| 245 | ### Removed these accessors to prevent confusion when LDAP is used |
|
| 246 | # def getEmailAddress(self, **kw): |
|
| @@ 1433-1446 (lines=14) @@ | ||
| 1430 | def guard_verify_transition(self): |
|
| 1431 | return guards.verify(self) |
|
| 1432 | ||
| 1433 | def getObjectWorkflowStates(self): |
|
| 1434 | """ |
|
| 1435 | This method is used as a metacolumn. |
|
| 1436 | Returns a dictionary with the workflow id as key and workflow state as |
|
| 1437 | value. |
|
| 1438 | :returns: {'review_state':'active',...} |
|
| 1439 | :rtype: dict |
|
| 1440 | """ |
|
| 1441 | workflow = getToolByName(self, 'portal_workflow') |
|
| 1442 | states = {} |
|
| 1443 | for w in workflow.getWorkflowsFor(self): |
|
| 1444 | state = w._getWorkflowStateOf(self).id |
|
| 1445 | states[w.state_var] = state |
|
| 1446 | return states |
|
| 1447 | ||
| 1448 | @security.public |
|
| 1449 | def workflow_script_submit(self): |
|
| @@ 2856-2868 (lines=13) @@ | ||
| 2853 | break |
|
| 2854 | return canbeverified |
|
| 2855 | ||
| 2856 | def getObjectWorkflowStates(self): |
|
| 2857 | """ |
|
| 2858 | This method is used as a metacolumn. |
|
| 2859 | Returns a dictionary with the workflow id as key and workflow state as |
|
| 2860 | value. |
|
| 2861 | :returns: {'review_state':'active',...} |
|
| 2862 | """ |
|
| 2863 | workflow = getToolByName(self, 'portal_workflow') |
|
| 2864 | states = {} |
|
| 2865 | for w in workflow.getWorkflowsFor(self): |
|
| 2866 | state = w._getWorkflowStateOf(self).id |
|
| 2867 | states[w.state_var] = state |
|
| 2868 | return states |
|
| 2869 | ||
| 2870 | # TODO Workflow, AnalysisRequest Move to guards.verify? |
|
| 2871 | def isUserAllowedToVerify(self, member): |
|