Skip to content

Commit

Permalink
Add modal to provide audit logging (provide a reason for impersonatin…
Browse files Browse the repository at this point in the history
…g) (#10)

* Add modal to provide reason for impersonating

* Update callback

* Remove test

* Fix refresh after switching (hopefully)

* Add loading indicator

* Add impersonate label

* Add admin settings to select reason behavior

* Fix settings issue

* Tweaks

* Only show setting if mod notes are enabled
  • Loading branch information
Ian Morland committed May 29, 2020
1 parent 4c509fd commit dbfec16
Show file tree
Hide file tree
Showing 17 changed files with 1,221 additions and 684 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"source": "https://github.com/FriendsOfFlarum/impersonate"
},
"require": {
"flarum/core": ">=0.1.0-beta.12 <0.1.0-beta.14"
"flarum/core": ">=0.1.0-beta.12 <0.1.0-beta.14",
"fof/components": "^0.1.1"
},
"extra": {
"flarum-extension": {
Expand Down
7 changes: 5 additions & 2 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
namespace FoF\Impersonate;

use Flarum\Extend;
use FoF\Components\Extend\AddFofComponents;
use Illuminate\Contracts\Events\Dispatcher;

return [
new AddFofComponents(),
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js'),

Expand All @@ -24,9 +26,10 @@
new Extend\Locales(__DIR__ . '/resources/locale'),

(new Extend\Routes('api'))
->post('/impersonate/{id:[0-9]+}', 'fof.impersonate.api.login', Controllers\LoginController::class),
->post('/impersonate', 'fof.impersonate.api.login', Controllers\LoginController::class),

function (Dispatcher $events) {
$events->subscribe(Listeners\AddApiAttributes::class);
$events->subscribe(Listeners\AddUserAttributes::class);

$events->subscribe(Access\UserPolicy::class);
Expand Down
2 changes: 1 addition & 1 deletion js/dist/admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dbfec16

Please sign in to comment.