mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
456 B
21 lines
456 B
# frozen_string_literal: true
|
|
|
|
class TestingAccountsController < ApplicationController
|
|
skip_authorization_check only: :destroy
|
|
|
|
def show
|
|
authorize!(:manage, current_account)
|
|
authorize!(:manage, current_user)
|
|
|
|
impersonate_user(Accounts.find_or_create_testing_user(true_user.account))
|
|
|
|
redirect_back(fallback_location: root_path)
|
|
end
|
|
|
|
def destroy
|
|
stop_impersonating_user
|
|
|
|
redirect_back(fallback_location: root_path)
|
|
end
|
|
end
|