Fixed a bug in organisation admin permission check

This commit is contained in:
2023-09-07 10:13:51 +01:00
parent daa4e78a27
commit f3af94a285

View File

@@ -103,7 +103,7 @@ class ServicesProvider
* @return bool true if $user is an administrator of $organisation. * @return bool true if $user is an administrator of $organisation.
*/ */
$authorizer->addCallback('is_organisation_admin', function ($user_id, $organisation_id) { $authorizer->addCallback('is_organisation_admin', function ($user_id, $organisation_id) {
return Capsule::table('organisation_members') $query = Capsule::table('organisation_members')
->where('user_id', $user_id) ->where('user_id', $user_id)
->where('organisation_id', $organisation_id) ->where('organisation_id', $organisation_id)
->where('flag_admin', true); ->where('flag_admin', true);