make permission for showing states configurable

This commit is contained in:
Helmut Merz 2013-01-30 11:55:10 +01:00
parent 344a1d81e5
commit c9969223e4
2 changed files with 5 additions and 1 deletions

View file

@ -670,7 +670,10 @@ class BaseView(GenericView, I18NView):
# states
viewStatesPermission = 'zope.ManageContent'
@Lazy
def viewStatesPermission(self):
opt = self.globalOptions('organize.show_states')
return opt and opt[0] or 'zope.ManageContent'
@Lazy
def states(self):

View file

@ -151,6 +151,7 @@ class WorkItemDetails(TrackDetails):
addParams=dict(id=self.track.__name__))
actions = [info, WorkItemStateAction(self)]
if self.isLastInRun and self.allowedToEditWorkItem:
#if self.allowedToEditWorkItem:
self.view.registerDojoDateWidget()
self.view.registerDojoNumberWidget()
self.view.registerDojoTextarea()