schema.py
changeset 4834 b718626a0e60
parent 4759 af2e6c377c71
child 4835 13b0b96d7982
equal deleted inserted replaced
4833:41a78fb4107c 4834:b718626a0e60
  1085         cw = form._cw
  1085         cw = form._cw
  1086     if cw is not None:
  1086     if cw is not None:
  1087         if hasattr(cw, 'is_super_session'):
  1087         if hasattr(cw, 'is_super_session'):
  1088             # cw is a server session
  1088             # cw is a server session
  1089             hasperm = cw.is_super_session or \
  1089             hasperm = cw.is_super_session or \
  1090                       not cw.vreg.config.is_hook_category_activated('integrity') or \
  1090                       not cw.is_hooks_category_activated('integrity') or \
  1091                       cw.user.has_permission(PERM_USE_TEMPLATE_FORMAT)
  1091                       cw.user.has_permission(PERM_USE_TEMPLATE_FORMAT)
  1092         else:
  1092         else:
  1093             hasperm = cw.user.has_permission(PERM_USE_TEMPLATE_FORMAT)
  1093             hasperm = cw.user.has_permission(PERM_USE_TEMPLATE_FORMAT)
  1094         if hasperm:
  1094         if hasperm:
  1095             return self.regular_formats + tuple(NEED_PERM_FORMATS)
  1095             return self.regular_formats + tuple(NEED_PERM_FORMATS)