File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 5555 "collective.compoundcriterion" ,
5656 "collective.eeafaceted.z3ctable" ,
5757 "eea.facetednavigation" ,
58- "imio.helpers>1.3.8 " ,
58+ "imio.helpers>1.3.10 " ,
5959 "imio.prettylink" ,
6060 "imio.pyutils" ,
6161 # 'z3c.jbot',
Original file line number Diff line number Diff line change 22from datetime import datetime
33from imio .esign import logger
44from imio .esign .utils import get_session_annotation
5+ from imio .helpers .ws import verify_auth_token
56from plone .restapi .deserializer import json_body
67from plone .restapi .services import Service
78
@@ -95,4 +96,20 @@ def reply(self): # noqa C901
9596
9697 def authorized (self ):
9798 """Check if the user is authorized to access this service."""
98- return True
99+ auth_header = self .request ._auth
100+ if not auth_header or not auth_header .startswith ("Bearer " ):
101+ return False
102+ try :
103+ token = auth_header .split (" " )[1 ]
104+ except IndexError :
105+ return False
106+ return verify_auth_token (token , groups = ["access_imio-apps-docs" ])
107+
108+
109+ """
110+ State:
111+ to_create_session
112+ to_sign
113+ to_upload
114+ refused
115+ """
You can’t perform that action at this time.
0 commit comments