Fixed a bug in organisation admin permission check

This commit is contained in:
bwilliams committed 2023-09-07 10:13:51 +01:00
1 parent daa4e78a27
commit f3af94a285
1 file changed
+1 -1
+1 -1
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);