mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Remove unused method arguments
This commit is contained in:
parent
d4e3ea1412
commit
e29d878d4f
|
@ -12,7 +12,7 @@ class CategoryPolicy
|
||||||
use HandlesAuthorization;
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
|
||||||
public function before(User $user, $ability, $category)
|
public function before(User $user, $category)
|
||||||
{
|
{
|
||||||
// Lets move all company related checks here.
|
// Lets move all company related checks here.
|
||||||
if ($category instanceof \App\Models\Category && !Company::isCurrentUserHasAccess($category)) {
|
if ($category instanceof \App\Models\Category && !Company::isCurrentUserHasAccess($category)) {
|
||||||
|
@ -30,7 +30,7 @@ class CategoryPolicy
|
||||||
* @param \App\Category $category
|
* @param \App\Category $category
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function view(User $user, Category $category = null)
|
public function view(User $user)
|
||||||
{
|
{
|
||||||
return $user->hasAccess('categories.view');
|
return $user->hasAccess('categories.view');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ class CategoryPolicy
|
||||||
* @param \App\Category $category
|
* @param \App\Category $category
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function update(User $user, Category $category = null)
|
public function update(User $user)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
return $user->hasAccess('categories.edit');
|
return $user->hasAccess('categories.edit');
|
||||||
|
@ -66,7 +66,7 @@ class CategoryPolicy
|
||||||
* @param \App\Category $category
|
* @param \App\Category $category
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function delete(User $user, Category $category = null)
|
public function delete(User $user)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
return $user->hasAccess('categories.delete');
|
return $user->hasAccess('categories.delete');
|
||||||
|
@ -92,7 +92,7 @@ class CategoryPolicy
|
||||||
* @param \App\Models\Category $category
|
* @param \App\Models\Category $category
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function manage(User $user, Category $category = null)
|
public function manage(User $user)
|
||||||
{
|
{
|
||||||
return $user->hasAccess('categories.edit');
|
return $user->hasAccess('categories.edit');
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ class LocationPolicy
|
||||||
use HandlesAuthorization;
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
|
||||||
public function before(User $user, $ability, $location)
|
public function before(User $user, $location)
|
||||||
{
|
{
|
||||||
// Lets move all company related checks here.
|
// Lets move all company related checks here.
|
||||||
if ($location instanceof \App\Models\Location && !Company::isCurrentUserHasAccess($location)) {
|
if ($location instanceof \App\Models\Location && !Company::isCurrentUserHasAccess($location)) {
|
||||||
|
@ -30,7 +30,7 @@ class LocationPolicy
|
||||||
* @param \App\Models\Location $location
|
* @param \App\Models\Location $location
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function view(User $user, Location $location = null)
|
public function view(User $user)
|
||||||
{
|
{
|
||||||
return $user->hasAccess('locations.view');
|
return $user->hasAccess('locations.view');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ class LocationPolicy
|
||||||
* @param \App\Models\Location $location
|
* @param \App\Models\Location $location
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function update(User $user, Location $location = null)
|
public function update(User $user)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
return $user->hasAccess('locations.edit');
|
return $user->hasAccess('locations.edit');
|
||||||
|
@ -66,7 +66,7 @@ class LocationPolicy
|
||||||
* @param \App\Models\Location $location
|
* @param \App\Models\Location $location
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function delete(User $user, Location $location = null)
|
public function delete(User $user)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
return $user->hasAccess('locations.delete');
|
return $user->hasAccess('locations.delete');
|
||||||
|
@ -92,7 +92,7 @@ class LocationPolicy
|
||||||
* @param \App\Models\Location $location
|
* @param \App\Models\Location $location
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function manage(User $user, Location $location = null)
|
public function manage(User $user)
|
||||||
{
|
{
|
||||||
return $user->hasAccess('locations.edit');
|
return $user->hasAccess('locations.edit');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue