Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit f201a15

Browse files
committed
fix: SpAuthorization - unouthorized when user is not in the request
1 parent 9657f72 commit f201a15

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Auth/Process/SpAuthorization.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ public function process(&$request)
140140
$spEntityId = $request[PerunConstants::SP_METADATA][PerunConstants::SP_METADATA_ENTITYID];
141141

142142
if (empty($request[PerunConstants::PERUN][PerunConstants::USER])) {
143-
throw new Exception(
144-
self::DEBUG_PREFIX . 'Request does not contain Perun user. Did you configure ' . PerunUser::STAGE . ' filter before this filter in the processing chain?'
145-
);
143+
Logger::debug(self::DEBUG_PREFIX . 'Request does not contain Perun user. Did you configure ' . PerunUser::STAGE . ' filter before this filter in the processing chain?');
144+
$this->unauthorized($request);
146145
}
147146
$user = $request[PerunConstants::PERUN][PerunConstants::USER];
148147
$facility = $this->adapter->getFacilityByEntityId($spEntityId);

0 commit comments

Comments
 (0)