mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Correct redirects for the AP
This commit is contained in:
parent
0afbb1947e
commit
6a59102a90
@ -84,6 +84,7 @@ trait VerifiesUserEmail
|
||||
return $this->render('auth.confirmed', [
|
||||
'root' => 'themes',
|
||||
'message' => ctrans('texts.security_confirmation'),
|
||||
'redirect_url' => request()->hasHeader('X-React') ? 'https://app.invoicing.co/#/' : url('/'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -231,8 +231,11 @@ class UserController extends BaseController
|
||||
|
||||
$return_user_collection = collect();
|
||||
|
||||
$users->each(function ($user, $key) use ($action, $return_user_collection) {
|
||||
if (auth()->user()->can('edit', $user)) {
|
||||
/** @var \App\Models\User $logged_in_user */
|
||||
$logged_in_user = auth()->user();
|
||||
|
||||
$users->each(function ($user, $key) use ($logged_in_user, $action, $return_user_collection) {
|
||||
if ($logged_in_user->can('edit', $user)) {
|
||||
$this->user_repo->{$action}($user);
|
||||
|
||||
$return_user_collection->push($user->id);
|
||||
@ -251,12 +254,11 @@ class UserController extends BaseController
|
||||
*/
|
||||
public function detach(DetachCompanyUserRequest $request, User $user)
|
||||
{
|
||||
// if ($request->entityIsDeleted($user)) {
|
||||
// return $request->disallowUpdate();
|
||||
// }
|
||||
/** @var \App\Models\User $logged_in_user */
|
||||
$logged_in_user = auth()->user();
|
||||
|
||||
$company_user = CompanyUser::whereUserId($user->id)
|
||||
->whereCompanyId(auth()->user()->companyId())
|
||||
->whereCompanyId($logged_in_user->companyId())
|
||||
->withTrashed()
|
||||
->first();
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<img src="{{ asset('images/invoiceninja-black-logo-2.png') }}" class="border-b border-gray-100 h-18 pb-4" alt="Invoice Ninja logo">
|
||||
<h1 class="text-center text-3xl mt-10">{{ ctrans('texts.confirmation') }}</h1>
|
||||
<p class="text-center opacity-75">{{ $message }}</p>
|
||||
<a class="button button-primary text-blue-600 text-center mt-8" href="{{ url('/') }}">{{ ctrans('texts.return_to_login') }}</a>
|
||||
<a class="button button-primary text-blue-600 text-center mt-8" href="{{ $redirect_url }}">{{ ctrans('texts.return_to_login') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user