Fix behavior of Organization comments and posts urls (#6383)

* Fix allowed_user method of notifications controller

* Change to keep the current order of checks
This commit is contained in:
Maykon Menezes 2020-03-02 13:49:25 -03:00 committed by GitHub
parent 3c8422c8d5
commit 7e397f4bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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