mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed path in comments
This commit is contained in:
parent
80e047f679
commit
4590054c75
|
@ -18,7 +18,7 @@ class UserPolicy
|
||||||
if ($targetUser instanceof \App\Models\User && !Company::isCurrentUserHasAccess($targetUser)) {
|
if ($targetUser instanceof \App\Models\User && !Company::isCurrentUserHasAccess($targetUser)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// If an admin, they can do all asset related tasks.
|
// If an admin, they can do all user related tasks.
|
||||||
if ($user->hasAccess('admin')) {
|
if ($user->hasAccess('admin')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ class UserPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can view the targetUser.
|
* Determine whether the user can view the targetUser.
|
||||||
*
|
*
|
||||||
* @param \App\User $user
|
* @param \App\Models\User $user
|
||||||
* @param \App\Consumable $targetUser
|
* @param \App\Models\Consumable $targetUser
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function view(User $user, User $targetUser = null)
|
public function view(User $user, User $targetUser = null)
|
||||||
|
@ -39,33 +39,31 @@ class UserPolicy
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can create users.
|
* Determine whether the user can create users.
|
||||||
*
|
*
|
||||||
* @param \App\User $user
|
* @param \App\Models\User $user
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function create(User $user)
|
public function create(User $user)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
return $user->hasAccess('users.create');
|
return $user->hasAccess('users.create');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can update the targetUser.
|
* Determine whether the user can update the targetUser.
|
||||||
*
|
*
|
||||||
* @param \App\User $user
|
* @param \App\Models\User $user
|
||||||
* @param \App\User $targetUser
|
* @param \App\Models\User $targetUser
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function update(User $user, User $targetUser = null)
|
public function update(User $user, User $targetUser = null)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
return $user->hasAccess('users.edit');
|
return $user->hasAccess('users.edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can delete the targetUser.
|
* Determine whether the user can delete the targetUser.
|
||||||
*
|
*
|
||||||
* @param \App\User $user
|
* @param \App\Models\User $user
|
||||||
* @param \App\User $targetUser
|
* @param \App\Models\User $targetUser
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function delete(User $user, User $targetUser = null)
|
public function delete(User $user, User $targetUser = null)
|
||||||
|
|
Loading…
Reference in a new issue