PHP Class App\Policies\EntityPolicy

Inheritance: use trait Illuminate\Auth\Access\HandlesAuthorization
Show file Open project: hillelcoren/invoice-ninja Class Usage Examples

Public Methods

Method Description
create ( User $user, $item ) : boolean
edit ( User $user, $item ) : boolean
editByOwner ( User $user, $ownerUserId ) : boolean
view ( User $user, $item ) : boolean
viewByOwner ( User $user, $ownerUserId ) : boolean

Private Methods

Method Description
checkModuleEnabled ( User $user, $item )

Method Details

create() public static method

public static create ( User $user, $item ) : boolean
$user app\models\User
return boolean

edit() public static method

public static edit ( User $user, $item ) : boolean
$user app\models\User
$item
return boolean

editByOwner() public static method

public static editByOwner ( User $user, $ownerUserId ) : boolean
$user app\models\User
$ownerUserId
return boolean

view() public static method

public static view ( User $user, $item ) : boolean
$user app\models\User
$item
return boolean

viewByOwner() public static method

public static viewByOwner ( User $user, $ownerUserId ) : boolean
$user app\models\User
$ownerUserId
return boolean