Are you KIDDING ME, Github??

This reverts commit c8e79aa5ca, reversing
changes made to e60f2b2332.

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-08-25 15:56:28 +01:00
parent 40108b196c
commit 07dbc6842c
20 changed files with 1128 additions and 808 deletions

View File

@@ -55,6 +55,8 @@ class LdapSync extends Command
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
// Map the LDAP attributes to the Snipe-IT user fields.
$ldap_map = [
"username" => Setting::getSettings()->ldap_username_field,
"last_name" => Setting::getSettings()->ldap_lname_field,
@@ -63,11 +65,17 @@ class LdapSync extends Command
"emp_num" => Setting::getSettings()->ldap_emp_num,
"email" => Setting::getSettings()->ldap_email,
"phone" => Setting::getSettings()->ldap_phone_field,
"mobile" => Setting::getSettings()->ldap_mobile,
"jobtitle" => Setting::getSettings()->ldap_jobtitle,
"address" => Setting::getSettings()->ldap_address,
"city" => Setting::getSettings()->ldap_city,
"state" => Setting::getSettings()->ldap_state,
"zip" => Setting::getSettings()->ldap_zip,
"country" => Setting::getSettings()->ldap_country,
"location" => Setting::getSettings()->ldap_location,
"dept" => Setting::getSettings()->ldap_dept,
"manager" => Setting::getSettings()->ldap_manager,
"display_name" => Setting::getSettings()->ldap_display_name,
];
$ldap_default_group = Setting::getSettings()->ldap_default_group;
@@ -234,9 +242,11 @@ class LdapSync extends Command
}
// Assign the mapped LDAP attributes for each user to the Snipe-IT user fields
for ($i = 0; $i < $results['count']; $i++) {
$item = [];
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';
$item['display_name'] = $results[$i][$ldap_map["display_name"]][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_map["emp_num"]][0] ?? '';
$item['lastname'] = $results[$i][$ldap_map["last_name"]][0] ?? '';
$item['firstname'] = $results[$i][$ldap_map["first_name"]][0] ?? '';
@@ -244,8 +254,13 @@ class LdapSync extends Command
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_map["phone"]][0] ?? '';
$item['mobile'] = $results[$i][$ldap_map["mobile"]][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_map["jobtitle"]][0] ?? '';
$item['address'] = $results[$i][$ldap_map["ldap_address"]][0] ?? '';
$item['city'] = $results[$i][$ldap_map["city"]][0] ?? '';
$item['state'] = $results[$i][$ldap_map["state"]][0] ?? '';
$item['country'] = $results[$i][$ldap_map["country"]][0] ?? '';
$item['zip'] = $results[$i][$ldap_map["zip"]][0] ?? '';
$item['department'] = $results[$i][$ldap_map["dept"]][0] ?? '';
$item['manager'] = $results[$i][$ldap_map["manager"]][0] ?? '';
$item['location'] = $results[$i][$ldap_map["location"]][0] ?? '';
@@ -278,6 +293,9 @@ class LdapSync extends Command
if($ldap_map["username"] != null){
$user->username = $item['username'];
}
if($ldap_map["display_name"] != null){
$user->display_name = $item['display_name'];
}
if($ldap_map["last_name"] != null){
$user->last_name = $item['lastname'];
}
@@ -293,6 +311,9 @@ class LdapSync extends Command
if($ldap_map["phone"] != null){
$user->phone = $item['telephone'];
}
if($ldap_map["mobile"] != null){
$user->mobile = $item['mobile'];
}
if($ldap_map["jobtitle"] != null){
$user->jobtitle = $item['jobtitle'];
}

View File

@@ -51,6 +51,7 @@ class SettingsController extends Controller
})->slice(0, 10)->map(function ($item) use ($settings) {
return (object) [
'username' => $item[$settings['ldap_username_field']][0] ?? null,
'display_name' => $item[$settings['ldap_display_name']][0] ?? null,
'employee_number' => $item[$settings['ldap_emp_num']][0] ?? null,
'lastname' => $item[$settings['ldap_lname_field']][0] ?? null,
'firstname' => $item[$settings['ldap_fname_field']][0] ?? null,

View File

@@ -64,6 +64,7 @@ class UsersController extends Controller
'users.jobtitle',
'users.last_login',
'users.last_name',
'users.display_name',
'users.locale',
'users.location_id',
'users.manager_id',
@@ -154,6 +155,10 @@ class UsersController extends Controller
$users = $users->where('users.last_name', '=', $request->input('last_name'));
}
if ($request->filled('display_name')) {
$users = $users->where('users.display_name', '=', $request->input('display_name'));
}
if ($request->filled('employee_num')) {
$users = $users->where('users.employee_num', '=', $request->input('employee_num'));
}
@@ -284,6 +289,7 @@ class UsersController extends Controller
[
'last_name',
'first_name',
'display_name',
'email',
'jobtitle',
'username',
@@ -509,6 +515,10 @@ class UsersController extends Controller
$user->username = $request->input('username');
}
if ($request->filled('display_name')) {
$user->display_name = $request->input('display_name');
}
if ($request->filled('email')) {
$user->email = $request->input('email');
}

View File

@@ -873,6 +873,7 @@ class SettingsController extends Controller
$setting->ldap_default_group = $request->input('ldap_default_group');
$setting->ldap_filter = $request->input('ldap_filter');
$setting->ldap_username_field = $request->input('ldap_username_field');
$setting->ldap_display_name = $request->input('ldap_display_name');
$setting->ldap_lname_field = $request->input('ldap_lname_field');
$setting->ldap_fname_field = $request->input('ldap_fname_field');
$setting->ldap_auth_filter_query = $request->input('ldap_auth_filter_query');
@@ -889,7 +890,12 @@ class SettingsController extends Controller
$setting->ldap_pw_sync = $request->input('ldap_pw_sync', '0');
$setting->custom_forgot_pass_url = $request->input('custom_forgot_pass_url');
$setting->ldap_phone_field = $request->input('ldap_phone');
$setting->ldap_mobile = $request->input('ldap_mobile');
$setting->ldap_jobtitle = $request->input('ldap_jobtitle');
$setting->ldap_address = $request->input('ldap_address');
$setting->ldap_city = $request->input('ldap_city');
$setting->ldap_state = $request->input('ldap_state');
$setting->ldap_zip = $request->input('ldap_zip');
$setting->ldap_country = $request->input('ldap_country');
$setting->ldap_location = $request->input('ldap_location');
$setting->ldap_dept = $request->input('ldap_dept');

View File

@@ -88,6 +88,7 @@ class UsersController extends Controller
//Username, email, and password need to be handled specially because the need to respect config values on an edit.
$user->email = trim($request->input('email'));
$user->username = trim($request->input('username'));
$user->display_name = $request->input('display_name');
if ($request->filled('password')) {
$user->password = bcrypt($request->input('password'));
}
@@ -240,6 +241,7 @@ class UsersController extends Controller
$user->first_name = $request->input('first_name');
$user->last_name = $request->input('last_name');
$user->display_name = $request->input('display_name');
$user->two_factor_optin = $request->input('two_factor_optin') ?: 0;
$user->locale = $request->input('locale');
$user->employee_num = $request->input('employee_num');

View File

@@ -31,7 +31,6 @@ class UsersTransformer
$array = [
'id' => (int) $user->id,
'avatar' => e($user->present()->gravatar) ?? null,
'name' => e($user->getFullNameAttribute()) ?? null,
'first_name' => e($user->first_name) ?? null,
'last_name' => e($user->last_name) ?? null,
@@ -140,6 +139,7 @@ class UsersTransformer
'first_name' => e($user->first_name),
'last_name' => e($user->last_name),
'username' => e($user->username),
'display_name' => e($user->display_name),
'created_by' => $user->adminuser ? [
'id' => (int) $user->adminuser->id,
'name'=> e($user->adminuser->present()->fullName),

View File

@@ -47,6 +47,7 @@ class UserImporter extends ItemImporter
// Pull the records from the CSV to determine their values
$this->item['id'] = trim($this->findCsvMatch($row, 'id'));
$this->item['username'] = trim($this->findCsvMatch($row, 'username'));
$this->item['display_name'] = trim($this->findCsvMatch($row, 'display_name'));
$this->item['first_name'] = trim($this->findCsvMatch($row, 'first_name'));
$this->item['last_name'] = trim($this->findCsvMatch($row, 'last_name'));
$this->item['email'] = trim($this->findCsvMatch($row, 'email'));

View File

@@ -339,6 +339,7 @@ class Importer extends Component
'start_date' => trans('general.start_date'),
'state' => trans('general.state'),
'username' => trans('admin/users/table.username'),
'display_name' => trans('admin/users/table.display_name'),
'vip' => trans('general.importer.vip'),
'website' => trans('general.website'),
'zip' => trans('general.zip'),
@@ -485,6 +486,13 @@ class Importer extends Component
'username',
trans('general.importer.checked_out_to_username'),
],
'display_name' =>
[
'display name',
'displayName',
'display',
trans('admin/users/table.display_name'),
],
'first_name' =>
[
'first name',

View File

@@ -3,6 +3,7 @@
namespace App\Models;
use App\Helpers\Helper;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
class SnipeModel extends Model

View File

@@ -34,6 +34,7 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
'validations' => [
$user_prefix . 'userName' => 'required',
$user_prefix . 'displayName' => 'nullable|string',
$user_prefix . 'name.givenName' => 'required',
$user_prefix . 'name.familyName' => 'nullable|string',
$user_prefix . 'externalId' => 'nullable|string',
@@ -121,7 +122,7 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
'honorificSuffix' => null
],
'displayName' => null,
'displayName' => AttributeMapping::eloquent("display_name"),
'nickName' => null,
'profileUrl' => null,
'title' => AttributeMapping::eloquent('jobtitle'),
@@ -153,21 +154,12 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
"primary" => AttributeMapping::constant(true)->ignoreWrite()
]],
// Mobile and work phone numbers
'phoneNumbers' => [
[
"value" => AttributeMapping::eloquent("phone"),
"display" => null,
"type" => AttributeMapping::constant("work")->ignoreWrite(),
"primary" => AttributeMapping::constant(true)->ignoreWrite(),
],
[
"value" => AttributeMapping::eloquent("mobile"),
"display" => null,
"type" => AttributeMapping::constant("mobile")->ignoreWrite(),
"primary" => AttributeMapping::constant(false)->ignoreWrite()
]
],
'phoneNumbers' => [[
"value" => AttributeMapping::eloquent("phone"),
"display" => null,
"type" => AttributeMapping::constant("work")->ignoreWrite(),
"primary" => AttributeMapping::constant(true)->ignoreWrite()
]],
'ims' => [[
"value" => null,

View File

@@ -64,6 +64,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'first_name',
'jobtitle',
'last_name',
'display_name',
'ldap_import',
'locale',
'location_id',
@@ -103,6 +104,8 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
protected $rules = [
'first_name' => 'required|string|min:1|max:191',
'last_name' => 'nullable|string|max:191',
'display_name' => 'nullable|string|max:191',
'username' => 'required|string|min:1|unique_undeleted|max:191',
'email' => 'email|nullable|max:191',
'password' => 'required|min:8',
@@ -113,9 +116,9 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'start_date' => 'nullable|date_format:Y-m-d',
'end_date' => 'nullable|date_format:Y-m-d|after_or_equal:start_date',
'autoassign_licenses' => 'boolean',
'address' => 'max:191|nullable',
'city' => 'max:191|nullable',
'state' => 'min:2|max:191|nullable',
'address' => 'nullable|string|max:191',
'city' => 'nullable|string|max:191',
'state' => 'nullable|string|max:191',
'country' => 'min:2|max:191|nullable',
'zip' => 'max:10|nullable',
'vip' => 'boolean',
@@ -132,15 +135,16 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'address',
'city',
'country',
'display_name',
'email',
'employee_num',
'first_name',
'jobtitle',
'last_name',
'locale',
'mobile',
'notes',
'phone',
'mobile',
'state',
'username',
'website',
@@ -157,7 +161,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'department' => ['name'],
'groups' => ['name'],
'company' => ['name'],
'manager' => ['first_name', 'last_name', 'username'],
'manager' => ['first_name', 'last_name', 'username', 'display_name'],
];
@@ -871,6 +875,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
{
return $query->where('first_name', 'LIKE', '%' . $search . '%')
->orWhere('last_name', 'LIKE', '%' . $search . '%')
->orWhere('display_name', 'LIKE', '%' . $search . '%')
->orWhereMultipleColumns(
[
'users.first_name',
@@ -1080,6 +1085,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
->orWhere('users.jobtitle', 'LIKE', '%' . $search . '%')
->orWhere('users.employee_num', 'LIKE', '%' . $search . '%')
->orWhere('users.username', 'LIKE', '%' . $search . '%')
->orWhere('users.display_name', 'LIKE', '%' . $search . '%')
->orwhereRaw('CONCAT(users.first_name," ",users.last_name) LIKE \''.$search.'%\'');
}

View File

@@ -191,7 +191,7 @@ class ComponentPresenter extends Presenter
*/
public function nameUrl()
{
return (string) link_to_route('components.show', e($this->name), $this->id);
return (string) link_to_route('consumables.show', e($this->name), $this->id);
}
/**
@@ -200,6 +200,6 @@ class ComponentPresenter extends Presenter
*/
public function viewUrl()
{
return route('components.show', $this->id);
return route('accessories.show', $this->id);
}
}

View File

@@ -79,6 +79,14 @@ class UserPresenter extends Presenter
'visible' => false,
'formatter' => 'usersLinkFormatter',
],
[
'field' => 'display_name',
'searchable' => true,
'sortable' => true,
'switchable' => false,
'title' => trans('admin/users/table.display_name'),
'visible' => true,
],
[
'field' => 'jobtitle',
'searchable' => true,
@@ -191,6 +199,7 @@ class UserPresenter extends Presenter
'visible' => true,
'formatter' => 'usernameRoleLinkFormatter',
],
[
'field' => 'employee_num',
'searchable' => true,
@@ -441,6 +450,30 @@ class UserPresenter extends Presenter
return '';
}
/**
* Returns the user full name, it simply concatenates
* the user first and last name.
*
* @return string
*/
// public function fullName()
// {
// if ($this->display_name) {
// return 'kjdfh'.html_entity_decode($this->display_name, ENT_QUOTES | ENT_XML1, 'UTF-8');
// }
// return 'roieuoe'.html_entity_decode($this->first_name.' '.$this->last_name, ENT_QUOTES | ENT_XML1, 'UTF-8');
// }
// /**
// * Standard accessor.
// * @TODO Remove presenter::fullName() entirely?
// * @return string
// */
// public function name()
// {
// return $this->fullName();
// }
/**

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
if (!Schema::hasColumn('users', 'display_name')) {
$table->text('display_name')->after('last_name')->nullable()->default(null);
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
if (Schema::hasColumn('users', 'display_name')) {
$table->dropColumn('display_name');
}
});
}
};

View File

@@ -0,0 +1,82 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('settings', function (Blueprint $table) {
if (!Schema::hasColumn('settings', 'ldap_display_name')) {
$table->string('ldap_display_name', 191)->after('ldap_fname_field')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_zip')) {
$table->string('ldap_zip', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_state')) {
$table->string('ldap_state', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_city')) {
$table->string('ldap_city', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_address')) {
$table->string('ldap_address', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_mobile')) {
$table->string('ldap_mobile', 191)->after('ldap_phone_field')->nullable()->default(null);
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_display_name')) {
$table->dropColumn('ldap_display_name');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_zip')) {
$table->dropColumn('ldap_zip');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_address')) {
$table->dropColumn('ldap_address');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_city')) {
$table->dropColumn('ldap_city');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_state')) {
$table->dropColumn('ldap_state');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_mobile')) {
$table->dropColumn('ldap_mobile');
}
});
}
};

View File

@@ -93,11 +93,11 @@ return [
'ldap_integration' => 'LDAP Integration',
'ldap_settings' => 'LDAP Settings',
'ldap_client_tls_cert_help' => 'Client-Side TLS Certificate and Key for LDAP connections are usually only useful in Google Workspace configurations with "Secure LDAP." Both are required.',
'ldap_location' => 'LDAP Location',
'ldap_location_help' => 'The Ldap Location field should be used if <strong>an OU is not being used in the Base Bind DN.</strong> Leave this blank if an OU search is being used.',
'ldap_location' => 'LDAP Location Field',
'ldap_location_help' => 'The LDAP Location field should be used if <strong>an OU is not being used in the Base Bind DN.</strong> Leave this blank if an OU search is being used.',
'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.',
'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.',
'ldap_manager' => 'LDAP Manager',
'ldap_manager' => 'LDAP Manager Field',
'ldap_server' => 'LDAP Server',
'ldap_server_help' => 'This should start with ldap:// (for unencrypted) or ldaps:// (for TLS or SSL)',
'ldap_server_cert' => 'LDAP SSL certificate validation',
@@ -106,26 +106,32 @@ return [
'ldap_tls' => 'Use TLS',
'ldap_tls_help' => 'This should be checked only if you are running STARTTLS on your LDAP server. ',
'ldap_uname' => 'LDAP Bind Username',
'ldap_dept' => 'LDAP Department',
'ldap_phone' => 'LDAP Telephone Number',
'ldap_jobtitle' => 'LDAP Job Title',
'ldap_country' => 'LDAP Country',
'ldap_dept' => 'LDAP Department Field',
'ldap_phone' => 'LDAP Phone Number Field',
'ldap_jobtitle' => 'LDAP Job Title Field',
'ldap_country' => 'LDAP Country Field',
'ldap_pword' => 'LDAP Bind Password',
'ldap_basedn' => 'Base Bind DN',
'ldap_filter' => 'LDAP Filter',
'ldap_pw_sync' => 'Cache LDAP Passwords',
'ldap_pw_sync_help' => 'Uncheck this box if you do not wish to keep LDAP passwords cached as local hashed passwords. Disabling this means that your users may not be able to login if your LDAP server is unreachable for some reason.',
'ldap_username_field' => 'Username Field',
'ldap_lname_field' => 'Last Name',
'ldap_fname_field' => 'LDAP First Name',
'ldap_username_field' => 'LDAP Username Field',
'ldap_display_name' => 'LDAP Display Name Field',
'ldap_lname_field' => 'LDAP Last Name Field',
'ldap_fname_field' => 'LDAP First Name Field',
'ldap_auth_filter_query' => 'LDAP Authentication query',
'ldap_version' => 'LDAP Version',
'ldap_active_flag' => 'LDAP Active Flag',
'ldap_activated_flag_help' => 'This value is used to determine whether a synced user can login to Snipe-IT. <strong>It does not affect the ability to check items in or out to them</strong>, and should be the <strong>attribute name</strong> within your AD/LDAP, <strong>not the value</strong>. <br><br>If this field is set to a field name that does not exist in your AD/LDAP, or the value in the AD/LDAP field is set to <code>0</code> or <code>false</code>, <strong>user login will be disabled</strong>. If the value in the AD/LDAP field is set to <code>1</code> or <code>true</code> or <em>any other text</em> means the user can log in. When the field is blank in your AD, we respect the <code>userAccountControl</code> attribute, which usually allows non-suspended users to log in.',
'ldap_invert_active_flag' => 'LDAP Invert Active Flag',
'ldap_invert_active_flag_help' => 'If enabled: when the value returned by LDAP Active Flag is <code>0</code> or <code>false</code> the user account will be active.',
'ldap_emp_num' => 'LDAP Employee Number',
'ldap_email' => 'LDAP Email',
'ldap_emp_num' => 'LDAP Employee Number Field',
'ldap_email' => 'LDAP Email Field',
'ldap_mobile' => 'LDAP Mobile Field',
'ldap_address' => 'LDAP Address Field',
'ldap_city' => 'LDAP City Field',
'ldap_state' => 'LDAP State/Province Field',
'ldap_zip' => 'LDAP Postal Code Field',
'ldap_test' => 'Test LDAP',
'ldap_test_sync' => 'Test LDAP Synchronization',
'license' => 'Software License',
@@ -462,21 +468,24 @@ return [
'legends' => [
'scoping' => 'Scoping',
'formats' => 'Default Formats',
'profiles' => 'User Profiles',
'eula' => 'EULA & Acceptance Preferences',
'misc_display' => 'Miscellaneous Display Options',
'email' => 'Email Preferences',
'checkin' => 'Checkin Preferences',
'dashboard' => 'Login & Dashboard Preferences',
'misc' => 'Miscellaneous',
'logos' => 'Logos & Display',
'colors' => 'Colors & Skins',
'dashboard' => 'Login & Dashboard Preferences',
'email' => 'Email Preferences',
'eula' => 'EULA & Acceptance Preferences',
'footer' => 'Footer Preferences',
'security' => 'Security Preferences',
'formats' => 'Default Formats',
'general' => 'General',
'intervals' => 'Intervals & Thresholds',
'logos' => 'Logos & Display',
'mapping' => 'LDAP Field Mapping',
'test' => 'Test LDAP Connection',
'misc' => 'Miscellaneous',
'misc_display' => 'Miscellaneous Display Options',
'profiles' => 'User Profiles',
'server' => 'Server Settings',
'scoping' => 'Scoping',
'security' => 'Security Preferences',
],

View File

@@ -35,6 +35,7 @@ return array(
'total_assets_cost' => "Total Assets Cost",
'updateuser' => 'Update User',
'username' => 'Username',
'display_name' => 'Display Name',
'user_deleted_text' => 'This user has been marked as deleted.',
'username_note' => '(This is used for Active Directory binding only, not for login.)',
'cloneuser' => 'Clone User',

View File

@@ -79,6 +79,18 @@
</div>
</div>
<div class="dynamic-form-row">
<div class="form-group">
<div class="col-md-3 col-xs-12 ">
<label class="control-label" for="modal-display_name">{{ trans('admin/users/table.display_name') }}:</label>
</div>
<div class="col-md-8 col-xs-12">
<input class="form-control" type='text' name="display_name" id='modal-display_name' required>
</div>
</div>
</div>
<!-- Checkbox for activation new user, by default set for activated -->
<div class="dynamic-form-row">
<div class="form-group">

File diff suppressed because it is too large Load Diff

View File

@@ -319,34 +319,13 @@
{{ trans('admin/users/table.name') }}
</div>
<div class="col-md-9">
{{ $user->present()->fullName() }}
{{ $user->first_name }} {{ $user->last_name }}
</div>
</div>
<!-- company -->
@if (!is_null($user->company))
<div class="row">
<div class="col-md-3">
{{ trans('general.company') }}
</div>
<div class="col-md-9">
@can('view', 'App\Models\Company')
<a href="{{ route('companies.show', $user->company->id) }}">
{{ $user->company->name }}
</a>
@else
{{ $user->company->name }}
@endcan
</div>
</div>
@endif
<!-- username -->
<div class="row">
@@ -366,7 +345,6 @@
</div>
<!-- display name -->
@if ($user->display_name)
<div class="row">
@@ -408,6 +386,26 @@
</div>
@endif
<!-- company -->
@if (!is_null($user->company))
<div class="row">
<div class="col-md-3">
{{ trans('general.company') }}
</div>
<div class="col-md-9">
@can('view', 'App\Models\Company')
<a href="{{ route('companies.show', $user->company->id) }}">
{{ $user->company->name }}
</a>
@else
{{ $user->company->name }}
@endcan
</div>
</div>
@endif
<!-- groups -->
<div class="row">