From 7e397f4bd545a53e97de76b648789fca9ca16c33 Mon Sep 17 00:00:00 2001 From: Maykon Menezes Date: Mon, 2 Mar 2020 13:49:25 -0300 Subject: [PATCH] Fix behavior of Organization comments and posts urls (#6383) * Fix allowed_user method of notifications controller * Change to keep the current order of checks --- app/controllers/notifications_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index ab4bf4913..6c0e90a6d 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -78,6 +78,6 @@ class NotificationsController < ApplicationController end def allowed_user? - @user.organizations.exists?(id: params[:org_id]) || @user.admin? + @user.org_member?(params[:org_id]) || @user.admin? end end