# HG changeset patch # User Sandrine Ribeau # Date 1260196775 28800 # Node ID c52619c738a55d2d8c7d1c337686c62ada86d4e4 # Parent b9436fe77c9e8ab359e631acf0917867dbee73ec api renaming update diff -r b9436fe77c9e -r c52619c738a5 schema.py --- a/schema.py Mon Dec 07 05:09:09 2009 -0800 +++ b/schema.py Mon Dec 07 06:39:35 2009 -0800 @@ -435,18 +435,18 @@ if objtype and subjtype: return self.rdef(subjtype, objtype).has_perm(session, action, **kwargs) elif subjtype: - for tschema in rschema.targets(subjtype, 'subject'): - rdef = rschema.rdef(subjtype, tschema) + for tschema in self.targets(subjtype, 'subject'): + rdef = self.rdef(subjtype, tschema) if not rdef.has_perm(action, req, **kwargs): return False elif objtype: - for tschema in rschema.targets(objtype, 'object'): - rdef = rschema.rdef(tschema, objtype) - if not rdef.has_perm(action, req, **kwargs): + for tschema in self.targets(objtype, 'object'): + rdef = self.rdef(tschema, objtype) + if not rdef.has_perm(session, action, **kwargs): return False else: for rdef in self.rdefs.itervalues(): - if not rdef.has_perm(action, req, **kwargs): + if not rdef.has_perm(session, action, **kwargs): return False @deprecated('use .rdef(subjtype, objtype).role_cardinality(role)') diff -r b9436fe77c9e -r c52619c738a5 schemas/workflow.py --- a/schemas/workflow.py Mon Dec 07 05:09:09 2009 -0800 +++ b/schemas/workflow.py Mon Dec 07 06:39:35 2009 -0800 @@ -187,7 +187,7 @@ class transition_of(RelationType): """link a transition to one or more workflow""" - permissions = META_RTYPE_PERMS + __permissions__ = META_RTYPE_PERMS inlined = True class subworkflow(RelationType): diff -r b9436fe77c9e -r c52619c738a5 sobjects/textparsers.py --- a/sobjects/textparsers.py Mon Dec 07 05:09:09 2009 -0800 +++ b/sobjects/textparsers.py Mon Dec 07 06:39:35 2009 -0800 @@ -21,7 +21,7 @@ """analyze and extract information from plain text by calling registered text parsers """ - id = 'textanalyzer' + __regid__ = 'textanalyzer' def parse(self, caller, text): for parsercls in self.req.vreg['components'].get('textparser', ()): @@ -36,7 +36,7 @@ method on the caller. """ - id = 'textparser' + __regid__ = 'textparser' __abstract__ = True def parse(self, caller, text): diff -r b9436fe77c9e -r c52619c738a5 web/request.py --- a/web/request.py Mon Dec 07 05:09:09 2009 -0800 +++ b/web/request.py Mon Dec 07 06:39:35 2009 -0800 @@ -87,7 +87,6 @@ self.next_tabindex = self.tabindexgen.next # page id, set by htmlheader template self.pageid = None - self.varmaker = rqlvar_maker() self.datadir_url = self._datadir_url() self._set_pageid() diff -r b9436fe77c9e -r c52619c738a5 web/views/basecomponents.py --- a/web/views/basecomponents.py Mon Dec 07 05:09:09 2009 -0800 +++ b/web/views/basecomponents.py Mon Dec 07 06:39:35 2009 -0800 @@ -218,12 +218,11 @@ class PdfViewComponent(component.EntityVComponent): __regid__ = 'pdfview' - __select__ = yes() context = 'ctxtoolbar' def cell_call(self, row, col, view): - entity = self.entity(row, col) + entity = self.cw_rset.get_entity(row, col) url = entity.absolute_url(vid=view.id, __template='pdf-main-template') iconurl = self.req.build_url('data/pdf_icon.gif') label = self.req._('Download page as pdf') @@ -232,7 +231,7 @@ class MetaDataComponent(component.EntityVComponent): - id = 'metadata' + __regid__ = 'metadata' context = 'navbottom' order = 1 diff -r b9436fe77c9e -r c52619c738a5 web/views/primary.py --- a/web/views/primary.py Mon Dec 07 05:09:09 2009 -0800 +++ b/web/views/primary.py Mon Dec 07 06:39:35 2009 -0800 @@ -283,7 +283,7 @@ """use this view for attributes whose value is an url and that you want to display as clickable link """ - id = 'urlattr' + __regid__ = 'urlattr' __select__ = EntityView.__select__ & match_kwargs('rtype') def cell_call(self, row, col, rtype, **kwargs): diff -r b9436fe77c9e -r c52619c738a5 web/views/wdoc.py --- a/web/views/wdoc.py Mon Dec 07 05:09:09 2009 -0800 +++ b/web/views/wdoc.py Mon Dec 07 06:39:35 2009 -0800 @@ -238,7 +238,7 @@ class HelpAction(action.Action): - id = 'help' + __regid__ = 'help' __select__ = yes() category = 'footer' diff -r b9436fe77c9e -r c52619c738a5 web/views/workflow.py --- a/web/views/workflow.py Mon Dec 07 05:09:09 2009 -0800 +++ b/web/views/workflow.py Mon Dec 07 06:39:35 2009 -0800 @@ -219,10 +219,10 @@ # workflow entity types edition ################################################ _afs = uicfg.autoform_section -_afs.tag_subject_of(('TrInfo', 'to_state', '*'), 'generated') -_afs.tag_subject_of(('TrInfo', 'from_state', '*'), 'generated') -_afs.tag_object_of(('State', 'allowed_transition', '*'), 'primary') -_afs.tag_subject_of(('State', 'allowed_transition', '*'), 'primary') +_afs.tag_subject_of(('TrInfo', 'to_state', '*'), 'main', 'hidden') +_afs.tag_subject_of(('TrInfo', 'from_state', '*'), 'main', 'hidden') +_afs.tag_object_of(('State', 'allowed_transition', '*'), 'main', 'attributes') +_afs.tag_subject_of(('State', 'allowed_transition', '*'), 'main', 'attributes') def workflow_items_for_relation(req, wfeid, wfrelation, targetrelation): wf = req.entity_from_eid(wfeid)