File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -171,25 +171,19 @@ def __repr__(self) -> str:
171
171
def _handle_simple_input_form_generator (f : StateInputStepFunc , authorize_callback : Callable [[OIDCUserModel | None ], bool ] | None = None ) -> StateInputFormGenerator :
172
172
"""Processes f into a form generator and injects a pre-hook for user authorization"""
173
173
def authorize_user_from_state (state : State ) -> None :
174
- logger .error ("authorize_user_from_state: called" )
175
174
user_model = state .pop ("__process_user" , None )
176
175
if user_model is not None :
177
176
user_model = cast (OIDCUserModel , user_model )
178
- else :
179
- logger .error ("authorize_user_from_state: no user model" )
180
177
181
178
if authorize_callback is not None :
182
179
logger .error ("authorize_user_from_state: callback found" )
183
180
authorize_callback (user_model )
184
181
if not authorize_callback (user_model ):
185
- logger .error ("authorize_user_from_state: FORBIDDEN" )
186
182
#TODO not sure that step name is available here, but could put it on state?
187
183
raise_status (HTTPStatus .FORBIDDEN , "User is not authorized to execute step" )
188
- else :
189
- logger .error ("authorize_user_from_state: no callback!" )
190
184
191
185
if inspect .isgeneratorfunction (f ):
192
- def generator_wrapper (state : State ):
186
+ def generator_wrapper (state : State ) -> Any :
193
187
authorize_user_from_state (state )
194
188
return f (state )
195
189
You can’t perform that action at this time.
0 commit comments