Improved class appy.Hack to be able to hack static methods as well; [gen] pod field can now accept a string in param 'showTemplate' if a single format is accepted; when showing linked objects in a ref field, we show a message and no data for every object the currently logged user is not allowed to read; improved the default UI layout (less table borders).

This commit is contained in:
Gaetan Delannay 2014-05-03 15:18:41 +02:00
parent 0a174098f1
commit b2dbef2bc4
16 changed files with 79 additions and 22 deletions

View file

@ -395,7 +395,14 @@ class Transition:
self.trigger(name, obj, wf, rq.get('comment', ''), reindex=False)
# Reindex obj if required.
if not obj.isTemporary(): obj.reindex()
return tool.goto(obj.getUrl(rq['HTTP_REFERER']))
# If we are viewing the object and if the logged user looses the
# permission to view it, redirect the user to its home page.
if not obj.allows('read') and \
(obj.absolute_url_path() in rq['HTTP_REFERER']):
back = tool.getHomePage()
else:
back = obj.getUrl(rq['HTTP_REFERER'])
return tool.goto(back)
@staticmethod
def getBack(workflow, transition):