Project

General

Profile

Defect #7773 ยป 0001-Enable-none-admin-users-to-get-users-list-from-REST-.patch

Mitsuhiro Tanino, 2016-11-01 17:17

View differences:

app/controllers/users_controller.rb
18 18
class UsersController < ApplicationController
19 19
  layout 'admin'
20 20

  
21
  before_action :require_admin, :except => :show
21
  before_action :require_admin, :except => [:show, :index]
22
  before_action :require_admin_or_api_request, :only => :index
22 23
  before_action :find_user, :only => [:show, :edit, :update, :destroy]
23 24
  accept_api_auth :index, :show, :create, :update, :destroy
24 25

  
    (1-1/1)