/** * Used to test if a certain user has permission to edit post, * returns TRUE if the user is the owner or has other posts access. * @param User $user * @return bool */ public function canEdit(User $user) { return $this->user_id == $user->id || $user->hasAnyAccess(['ekstremedia.store.item.delete']); }
/** * Used to test if a certain user has permission to edit post, * returns TRUE if the user is the owner or has other posts access. * @param User $user * @return bool */ public function canEdit(User $user) { return $this->user_id == $user->id || $user->hasAnyAccess(['rainlab.blog.access_other_posts']); }
/** * @param User $user * * @return bool */ public function canEdit(User $user) { return $this->user_id == $user->id || $user->hasAnyAccess(['keios.support.access_uploaded_files']); }