Adds the user name as a separate field
This commit is contained in:
@@ -36,7 +36,7 @@ final class User extends Resource
|
||||
* @var array
|
||||
*/
|
||||
public static $search = [
|
||||
'id', 'name', 'email', 'department', 'job_title',
|
||||
'id', 'name', 'username', 'email', 'department', 'job_title',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -59,12 +59,19 @@ public function fields(NovaRequest $request): array
|
||||
->rules('required', 'max:255')
|
||||
->help('The user\'s full name, imported from Azure AD when they first log in.'),
|
||||
|
||||
Text::make('Username')
|
||||
->sortable()
|
||||
->rules('required', 'max:255')
|
||||
->creationRules('unique:users,username')
|
||||
->updateRules('unique:users,username,{{resourceId}}')
|
||||
->help('The user\'s Azure AD principal name (UPN), used to identify them when logging in via SSO.'),
|
||||
|
||||
Text::make('Email')
|
||||
->sortable()
|
||||
->rules('required', 'email', 'max:254')
|
||||
->creationRules('unique:users,email')
|
||||
->updateRules('unique:users,email,{{resourceId}}')
|
||||
->help('The user\'s email address, used to identify them when logging in via Azure AD.'),
|
||||
->help('The user\'s email address.'),
|
||||
|
||||
Text::make('Azure ID', 'azure_id')
|
||||
->onlyOnDetail()
|
||||
|
||||
Reference in New Issue
Block a user