mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Merge pull request #14614 from akemidx/feature/sc-19796
ADDED: Export User Permissions (Superuser & Admin)
This commit is contained in:
commit
f710b1aac3
|
@ -563,6 +563,7 @@ class UsersController extends Controller
|
|||
trans('general.accessories'),
|
||||
trans('general.consumables'),
|
||||
trans('general.groups'),
|
||||
trans('general.permission_level'),
|
||||
trans('general.notes'),
|
||||
trans('admin/users/table.activated'),
|
||||
trans('general.created_at'),
|
||||
|
@ -577,6 +578,18 @@ class UsersController extends Controller
|
|||
$user_groups .= $user_group->name.', ';
|
||||
}
|
||||
|
||||
|
||||
$permissionstring = "";
|
||||
if(array_key_exists("superuser", json_decode($user->permissions, true))) {
|
||||
$permissionstring = trans('general.superuser');
|
||||
}
|
||||
elseif(array_key_exists("admin", json_decode($user->permissions, true))) {
|
||||
$permissionstring = trans('general.admin');
|
||||
}
|
||||
else {
|
||||
$permissionstring = trans('general.user');
|
||||
}
|
||||
|
||||
// Add a new row with data
|
||||
$values = [
|
||||
$user->id,
|
||||
|
@ -594,6 +607,7 @@ class UsersController extends Controller
|
|||
$user->accessories->count(),
|
||||
$user->consumables->count(),
|
||||
$user_groups,
|
||||
$permissionstring,
|
||||
$user->notes,
|
||||
($user->activated == '1') ? trans('general.yes') : trans('general.no'),
|
||||
$user->created_at,
|
||||
|
|
|
@ -143,6 +143,7 @@ return [
|
|||
'generate_labels' => 'Generate Labels',
|
||||
'github_markdown' => 'This field accepts <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>.',
|
||||
'groups' => 'Groups',
|
||||
'permission_level' => 'Permission Level',
|
||||
'gravatar_email' => 'Gravatar Email Address',
|
||||
'gravatar_url' => '<a href="http://gravatar.com"><small>Change your avatar at Gravatar.com</small></a>.',
|
||||
'history' => 'History',
|
||||
|
@ -274,6 +275,7 @@ return [
|
|||
'status_labels' => 'Status Labels',
|
||||
'status' => 'Status',
|
||||
'accept_eula' => 'Acceptance Agreement',
|
||||
'superuser' => 'Superuser',
|
||||
'supplier' => 'Supplier',
|
||||
'suppliers' => 'Suppliers',
|
||||
'sure_to_delete' => 'Are you sure you wish to delete',
|
||||
|
|
Loading…
Reference in a new issue