@@ -477,7 +477,7 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
// check for permissions related fields and pull them out if the current user cannot edit them
|
||||
if (auth()->user()->can('editSensitiveUserFields') && auth()->user()->can('editableOnDemo')) {
|
||||
if (auth()->user()->can('canEditAuthFields') && auth()->user()->can('editableOnDemo')) {
|
||||
|
||||
if ($request->filled('password')) {
|
||||
$user->password = bcrypt($request->input('password'));
|
||||
|
||||
@@ -265,9 +265,8 @@ class UsersController extends Controller
|
||||
->where('assigned_to', $user->id)
|
||||
->update(['location_id' => $request->input('location_id', null)]);
|
||||
|
||||
|
||||
// check for permissions related fields and only set them if the user has permission to edit them
|
||||
if (auth()->user()->can('editSensitiveUserFields') && auth()->user()->can('editableOnDemo')) {
|
||||
if (auth()->user()->can('canEditAuthFields') && auth()->user()->can('editableOnDemo')) {
|
||||
|
||||
$user->username = trim($request->input('username'));
|
||||
$user->email = trim($request->input('email'));
|
||||
|
||||
Reference in New Issue
Block a user