diff --git a/app/Http/Controllers/Users/LDAPImportController.php b/app/Http/Controllers/Users/LDAPImportController.php index 6e2a3091b0..337a43bc36 100644 --- a/app/Http/Controllers/Users/LDAPImportController.php +++ b/app/Http/Controllers/Users/LDAPImportController.php @@ -6,6 +6,7 @@ use App\Http\Controllers\Controller; use App\Services\LdapAd; use Illuminate\Http\Request; use Illuminate\Support\Facades\Artisan; +use App\Models\User; // Note that this is awful close to 'Users' the namespace above; be careful class LDAPImportController extends Controller { @@ -65,6 +66,7 @@ class LDAPImportController extends Controller */ public function store(Request $request) { + $this->authorize('update', User::class); // Call Artisan LDAP import command. $location_id = $request->input('location_id'); Artisan::call('snipeit:ldap-sync', ['--location_id' => $location_id, '--json_summary' => true]); diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index 016d310d78..93942596c5 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -287,7 +287,7 @@ class CustomField extends Model { $arr = preg_split("/\\r\\n|\\r|\\n/", $this->field_values); - if (($this->element!='checkbox') && ($this->element!='checkbox')) { + if (($this->element!='checkbox') && ($this->element!='radio')) { $result[''] = 'Select '.strtolower($this->format); } diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.php index 7e6213c187..2eb2238522 100644 --- a/resources/views/custom_fields/fields/edit.blade.php +++ b/resources/views/custom_fields/fields/edit.blade.php @@ -70,7 +70,7 @@ -