<div class="form-group">
  <div class="col-sm-6 form-group">
    <label>Nome</label>
    <input type="text" ng-model="item.name" placeholder="ex: Veterinário" class="form-control input-lg" />
  </div>
  <div class="col-sm-3 form-group">
    <label>Nível de Administrador</label><br/>
    <input type="checkbox" ng-model="item.admin" class="form-control w3-check" />
  </div>
  <div class="col-sm-3 form-group">
    <label>Nível de Aprovação</label>
    <input type="number" ng-model="item.approvalLevel" min="0" class="form-control input-lg" />
  </div>
</div>
<div ng-if="!item.admin">
  <div class="col-sm-12 form-group">
    <p><label>Permissões</label> <a ng-click="togglePermissions(true)" class="btn btn-info">todas</a> - <a ng-click="togglePermissions(false)" class="btn btn-info">nenhuma</a></p>
    <div class="table-responsive">
      <table class="table table-striped table-bordered table-condensed">
        <tr ng-repeat="(entityName, entity) in permissions">
          <td>{{entity.label}}</td>
          <td>
            <p ng-repeat="(actionName, action) in entity" ng-if="actionName !== 'label'">
              <input type="checkbox" ng-model="item.permissions[entityName][actionName]" class="w3-check"> {{action.label}}
            </p>
          </td>
        </tr>
      </table>
    </div>
  </div>
</div>