mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-19 14:41:32 +00:00
Implemented user, api_tokem & role activity logging
Also refactored some role content, primarily updating the permission controller to be RoleController since it only dealt with roles.
This commit is contained in:
parent
3f7180fa99
commit
da37700ac2
12 changed files with 118 additions and 59 deletions
app/Http/Controllers
|
@ -1,5 +1,6 @@
|
|||
<?php namespace BookStack\Http\Controllers;
|
||||
|
||||
use BookStack\Actions\ActivityType;
|
||||
use BookStack\Auth\Access\SocialAuthService;
|
||||
use BookStack\Auth\Access\UserInviteService;
|
||||
use BookStack\Auth\User;
|
||||
|
@ -102,6 +103,7 @@ class UserController extends Controller
|
|||
|
||||
$this->userRepo->downloadAndAssignUserAvatar($user);
|
||||
|
||||
$this->logActivity(ActivityType::USER_CREATE, $user);
|
||||
return redirect('/settings/users');
|
||||
}
|
||||
|
||||
|
@ -194,6 +196,7 @@ class UserController extends Controller
|
|||
|
||||
$user->save();
|
||||
$this->showSuccessNotification(trans('settings.users_edit_success'));
|
||||
$this->logActivity(ActivityType::USER_UPDATE, $user);
|
||||
|
||||
$redirectUrl = userCan('users-manage') ? '/settings/users' : ('/settings/users/' . $user->id);
|
||||
return redirect($redirectUrl);
|
||||
|
@ -234,6 +237,7 @@ class UserController extends Controller
|
|||
|
||||
$this->userRepo->destroy($user);
|
||||
$this->showSuccessNotification(trans('settings.users_delete_success'));
|
||||
$this->logActivity(ActivityType::USER_DELETE, $user);
|
||||
|
||||
return redirect('/settings/users');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue