1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Allow removing deleted user

This commit is contained in:
David Bomba 2023-03-15 11:05:58 +11:00
parent 6f1171f3b7
commit 434d2f6763
2 changed files with 3 additions and 7 deletions

View File

@ -592,9 +592,9 @@ class UserController extends BaseController
*/
public function detach(DetachCompanyUserRequest $request, User $user)
{
if ($request->entityIsDeleted($user)) {
return $request->disallowUpdate();
}
// if ($request->entityIsDeleted($user)) {
// return $request->disallowUpdate();
// }
$company_user = CompanyUser::whereUserId($user->id)
->whereCompanyId(auth()->user()->companyId())

View File

@ -12,14 +12,10 @@
namespace App\Http\Requests\User;
use App\Http\Requests\Request;
use App\Models\User;
use App\Utils\Traits\ChecksEntityStatus;
use App\Utils\Traits\MakesHash;
class DetachCompanyUserRequest extends Request
{
use MakesHash;
use ChecksEntityStatus;
/**
* Determine if the user is authorized to make this request.