- if ($role->name === 'admin') {
- throw new PermissionsException('The admin role cannot be deleted');
+ if ($role->system_name && in_array($role->system_name, $this->systemRoles)) {
+ throw new PermissionsException(trans('errors.role_system_cannot_be_deleted'));