Skip to content

Commit

Permalink
Issue #27: Simplify a condition in wopiCheckFileInfo().
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote authored and hfiguiere committed Oct 24, 2024
1 parent 6a547a4 commit 9688d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function wopiCheckFileInfo(string $id, Request $request) {
$user = User::load($jwt_payload->uid);
$can_write = $jwt_payload->wri;

if ($can_write && $can_write != $user->hasPermission('edit any media in collabora')) {
if ($can_write && !$user->hasPermission('edit any media in collabora')) {
\Drupal::logger('cool')->error('Token and user permissions do not match.');
return static::permissionDenied();
}
Expand Down

0 comments on commit 9688d27

Please sign in to comment.