primo upload

This commit is contained in:
claus75a
2024-03-16 20:37:32 +01:00
commit e43b9b4b28
3019 changed files with 406000 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Vanguard\Support;
trait CanImpersonateUsers
{
/**
* Check if a user can impersonate other users.
*
* @return bool
*/
public function canImpersonate()
{
return $this->hasPermission('users.manage');
}
/**
* Check if a target user can be impersonated.
* By default, all users can be impersonated if a currently logged
* user is not already impersonating another user.
*
* @return bool
*/
public function canBeImpersonated()
{
return ! app('impersonate')->isImpersonating();
}
}