validation = $validation; } /** * @return bool */ protected function authorized($object): bool { //cief todo: 66 - temporary workaround // if (!Auth::user()->can('update bank_metadata')) { // return false; // } // return true; if (in_array(Auth::user()->type, RoleTypes::ADMIN_ROLES)) { return true; } return false; } /** * @param BankMetadataObject $object * @return bool * @throws \App\Classes\Exceptions\RequestValidationException */ protected function validators($object): bool { return $this->validation->validate($object); } /** * @param BankMetadataObject $object * @return bool */ protected function criteria($object): bool { return true; } }