From e68e47464e29fc6d913299a44f2170ad6999272a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20C=C3=B4t=C3=A9-Tremblay?= Date: Tue, 11 Oct 2016 14:51:42 -0400 Subject: [PATCH] As a non-admin user using API, I want to be able to filter users by their username without getting forbidden exception --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 51f6af6..48e83f7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -18,7 +18,7 @@ class UsersController < ApplicationController layout 'admin' - before_action :require_admin, :except => :show + before_action :require_admin, :except => [:show, :index] before_action :find_user, :only => [:show, :edit, :update, :destroy] accept_api_auth :index, :show, :create, :update, :destroy -- 2.1.4