示例#1
0
文件: Item.php 项目: ekstremedia/shop
 /**
  * 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']);
 }
示例#2
0
 /**
  * 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']);
 }