mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Added endpoints for creating and downloading api user certificates
This commit is contained in:
parent
b558c80e83
commit
47b6a1b87a
18 changed files with 377 additions and 102 deletions
|
@ -2,6 +2,7 @@ require 'serializers/repp/api_user'
|
|||
module Repp
|
||||
module V1
|
||||
class ApiUsersController < BaseController
|
||||
before_action :find_api_user, only: %i[show update destroy]
|
||||
load_and_authorize_resource
|
||||
|
||||
THROTTLED_ACTIONS = %i[index show create update destroy].freeze
|
||||
|
@ -60,6 +61,10 @@ module Repp
|
|||
|
||||
private
|
||||
|
||||
def find_api_user
|
||||
@api_user = current_user.registrar.api_users.find(params[:id])
|
||||
end
|
||||
|
||||
def api_user_params
|
||||
params.require(:api_user).permit(:username, :plain_text_password, :active,
|
||||
:identity_code, { roles: [] })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue