/** * add new access,and remove access that is not in array * * @param array $privileges */ public function syncAccess(array $privileges) { $this->user->disallow('edit-product'); $this->user->disallow('report-order'); $this->user->disallow('read-report'); $this->user->disallow('billing'); $this->user->disallow('void-order'); $this->giveAccess($privileges); }