Multiple before_filter statements for correct_user and admin
问题 I have a Group resource that I'm trying to set up with proper authorizations. The authorization logic I'm trying to implement is this: Only group members should be able to view their group. An admin can view any group, as well as take other actions. I'm attempting to do this with the following before_filter statements in the group controller: before_filter :signed_in_user before_filter :correct_user, only: :show before_filter :admin_user, only: [:show, :index, :edit, :update, :destroy]