33namespace VentureDrake \LaravelCrm \Policies ;
44
55use App \User ;
6+ use App \User as UpdatingUser ;
67use Illuminate \Auth \Access \HandlesAuthorization ;
78
89class UserPolicy
@@ -29,7 +30,7 @@ public function viewAny(User $user)
2930 * @param \App\User $model
3031 * @return mixed
3132 */
32- public function view (User $ user , User $ model )
33+ public function view (User $ user , UpdatingUser $ updatingUser )
3334 {
3435 if ($ user ->hasPermissionTo ('view crm users ' )) {
3536 return true ;
@@ -56,7 +57,7 @@ public function create(User $user)
5657 * @param \App\User $model
5758 * @return mixed
5859 */
59- public function update (User $ user , User $ model )
60+ public function update (User $ user , UpdatingUser $ updatingUser )
6061 {
6162 if ($ user ->hasPermissionTo ('edit crm users ' )) {
6263 return true ;
@@ -70,7 +71,7 @@ public function update(User $user, User $model)
7071 * @param \App\User $model
7172 * @return mixed
7273 */
73- public function delete (User $ user , User $ model )
74+ public function delete (User $ user , UpdatingUser $ updatingUser )
7475 {
7576 if ($ user ->hasPermissionTo ('delete crm users ' )) {
7677 return true ;
@@ -84,7 +85,7 @@ public function delete(User $user, User $model)
8485 * @param \App\User $model
8586 * @return mixed
8687 */
87- public function restore (User $ user , User $ model )
88+ public function restore (User $ user , UpdatingUser $ updatingUser )
8889 {
8990 if ($ user ->hasPermissionTo ('delete crm users ' )) {
9091 return true ;
@@ -98,7 +99,7 @@ public function restore(User $user, User $model)
9899 * @param \App\User $model
99100 * @return mixed
100101 */
101- public function forceDelete (User $ user , User $ model )
102+ public function forceDelete (User $ user , UpdatingUser $ updatingUser )
102103 {
103104 return false ;
104105 }
0 commit comments