File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 5656 "collective.compoundcriterion" ,
5757 "collective.eeafaceted.z3ctable" ,
5858 "eea.facetednavigation" ,
59- "imio.helpers>1.3.8 " ,
59+ "imio.helpers>1.3.10 " ,
6060 "imio.prettylink" ,
6161 "imio.pyutils" ,
6262 # 'z3c.jbot',
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22from datetime import datetime
33from imio .esign .utils import get_session_annotation
4+ from imio .helpers .ws import verify_auth_token
45from plone .restapi .deserializer import json_body
56from plone .restapi .services import Service
67
@@ -99,7 +100,14 @@ def reply(self): # noqa C901
99100
100101 def authorized (self ):
101102 """Check if the user is authorized to access this service."""
102- return True
103+ auth_header = self .request ._auth
104+ if not auth_header or not auth_header .startswith ("Bearer " ):
105+ return False
106+ try :
107+ token = auth_header .split (" " )[1 ]
108+ except IndexError :
109+ return False
110+ return verify_auth_token (token , groups = ["access_apims-esign" ])
103111
104112
105113"""
You can’t perform that action at this time.
0 commit comments