Project

General

Profile

« Previous | Next » 

Revision ff3aabbb

Added by Tomáš Strachota about 9 years ago

Fixes #9678 - Can't update admin flag for users via API

find_resource needs to be defined prior to UsersMixin is included as it
requires the variable @user being set.

(cherry picked from commit 1b1b39861e485523b0cc0c6435fef30c38df7e07)

View differences:

app/controllers/api/v1/users_controller.rb
module Api
module V1
class UsersController < V1::BaseController
include Foreman::Controller::UsersMixin
before_filter :find_resource, :only => %w{show update destroy}
# find_resource needs to be defined prior to UsersMixin is included, it depends on @user
include Foreman::Controller::UsersMixin
api :GET, "/users/", "List all users."
param :search, String, :desc => "filter results"

Also available in: Unified diff