Commit 0051958d authored by Jérome Perrin's avatar Jérome Perrin

only allow this for manager


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22459 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 64141666
import re
import cgi
from Acquisition import aq_base
from AccessControl import Unauthorized
from Products.CMFCore.utils import _checkPermission
from Products.ERP5Type import Permissions
try:
from Products import ExternalEditor
......@@ -32,6 +35,8 @@ def traverse(ob, r, result, command_line_arguments):
break
def grep(self, pattern, A=0, B=0, r=1, i=0):
if not _checkPermission(Permissions.ManagePortal, self):
raise Unauthorized(self)
command_line_arguments = {} # emulate grep command line args
command_line_arguments['A'] = int(A)
command_line_arguments['B'] = int(B)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment