system:
  - name: organization
    cname: '组织管理'
    value: 'organization'
    children:
      - name: member
        cname: '成员'
        value: 'member'
        children:
          - name: view
            cname: '查看'
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/user/accounts"
              - "GET:/api/v1/user/departments"
          - name: manager
            cname: '管理'
            value: 'manager'
            apis:
              - "POST:/api/v1/user/account"
              - "PUT:/api/v1/user/account"
              - "DELETE:/api/v1/user/account"
              - "POST:/api/v1/user/account/enable"
              - "POST:/api/v1/user/account/disable"
              - "POST:/api/v1/user/department"
              - "PUT:/api/v1/user/department"
              - "DELETE:/api/v1/user/department"
              - "POST:/api/v1/user/department/member"
              - "DELETE:/api/v1/user/department/member"
              - "POST:/api/v1/user/department/member/remove"
              - "POST:/api/v1/account/role"
            dependents:
              - system.organization.member.view
      - name: team
        cname: '团队'
        value: 'team'
        children:
          - name: view
            cname: '查看'
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/manager/teams"
              - "GET:/api/v1/manager/team"
          - name: manager
            cname: '管理'
            value: 'manager'
            apis:
              - "POST:/api/v1/manager/team"
              - "PUT:/api/v1/manager/team"
              - "DELETE:/api/v1/manager/team"
            dependents:
              - system.organization.team.view
      - name: role
        cname: '角色'
        value: 'role'
        children:
          - name: view system role
            cname: '查看系统角色'
            guest_allow: true
            value: 'view_system_role'
            apis:
              - "GET:/api/v1/system/roles"
              - "GET:/api/v1/system/role"
          - name: view team role
            cname: '查看团队角色'
            guest_allow: true
            value: 'view_team_role'
            apis:
              - "GET:/api/v1/team/roles"
              - "GET:/api/v1/team/role"
  - name: API Market
    cname: 'API市场'
    value: 'api_market'
    children:
      - name: service classification
        cname: '服务分类'
        value: 'service_classification'
        children:
          - name: view
            cname: '查看'
            value: 'view'
            guest_allow: true
#            apis:
#              - "GET:/api/v1/catalogues"
          - name: manager
            cname: '管理'
            value: 'manager'
            apis:
              - "POST:/api/v1/catalogue"
              - "PUT:/api/v1/catalogue"
              - "DELETE:/api/v1/catalogue"
              - "PUT:/api/v1/catalogue/sort"
            dependents:
              - system.api_market.service_classification.view
  - name: Devops
    cname: 运维
    value: 'devops'
    children:
      - name: cluster
        cname: 集群
        value: 'cluster'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/cluster/nodes"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "PUT:/api/v1/cluster/reset"
              - "POST:/api/v1/cluster/check"
      - name: ssl certificate
        cname: 证书
        value: 'ssl_certificate'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/certificates"
              - "GET:/api/v1/certificate"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/certificate"
              - "PUT:/api/v1/certificate"
              - "DELETE:/api/v1/certificate"
      - name: Data Source
        cname: '数据源'
        value: 'data_source'
        children:
          - name: view
            cname: '查看'
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/monitor/config"
          - name: manager
            cname: '管理'
            value: 'manager'
            apis:
              - "POST:/api/v1/monitor/config"
              - "PUT:/api/v1/monitor/config"
      - name: log configuration
        cname: 日志
        value: 'log_configuration'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/dynamic/{name}/info"
              - "GET:/api/v1/dynamic/{name}/list"
              - "GET:/api/v1/dynamic/{name}/render"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/dynamic/{name}"
              - "PUT:/api/v1/dynamic/{name}/config"
              - "DELETE:/api/v1/dynamic/{name}/batch"
              - "PUT:/api/v1/dynamic/{name}/online"
              - "PUT:/api/v1/dynamic/{name}/offline"
      - name: monitor
        cname: 监控
        value: 'monitor'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/monitor/config"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/monitor/config"
  - name: dashboard
    cname: 仪表盘
    value: 'dashboard'
    children:
      - name: run view
        cname: 运行视图
        value: 'run_view'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/monitor/overview/invoke"
              - "GET:/api/v1/monitor/overview/message"
              - "GET:/api/v1/monitor/overview/top10"
              - "GET:/api/v1/monitor/overview/summary"
  - name: workspace
    cname: 工作空间
    value: 'workspace'
    children:
      - name: application
        cname: 应用
        value: 'application'
        children:
          - name: view all
            cname: 查看所有应用
            value: 'view_all'
            guest_allow: true
            apis:
              - "GET:/api/v1/apps"
      - name: service
        cname: 服务
        value: 'service'
        children:
          - name: view all
            cname: 查看所有服务
            value: 'view_all'
            guest_allow: true
            apis:
              - "GET:/api/v1/services"
      - name: team
        cname: 团队
        value: 'team'
        children:
          - name: view all
            cname: 查看所有团队
            value: 'view_all'
            guest_allow: true
            apis:
              - "GET:/api/v1/manager/teams"
      - name: api market
        cname: API市场
        value: 'api_market'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/catalogue/services"
              - "GET:/api/v1/catalogue/service"
team:
  - name: service
    cname: 服务
    value: 'service'
    children:
      - name: router
        cname: 路由
        value: 'router'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/service/routers"
              - "GET:/api/v1/service/router/detail"
              - "GET:/api/v1/service/router/detail/simple"
              - "GET:/api/v1/service/router/define"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/service/router"
              - "PUT:/api/v1/service/router"
              - "DELETE:/api/v1/service/router"
      - name: api_doc
        cname: API文档
        value: 'api_doc'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/service/api_doc"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "PUT:/api/v1/service/api_doc"
              - "POST:/api/v1/service/api_doc/upload"
      - name: upstream
        cname: 上游
        value: 'upstream'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/service/upstream"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "PUT:/api/v1/service/upstream"
      - name: release
        cname: 发布
        value: 'release'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/service/releases"
              - "GET:/api/v1/service/release"
              - "GET:/api/v1/service/publishs"
              - "GET:/api/v1/service/publish/check"
              - "GET:/api/v1/service/release/preview"
              - "GET:/api/v1/service/publish/status"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/service/publish/release/do"
              - "PUT:/api/v1/service/publish/execute"
              - "DELETE:/api/v1/service/release"
      - name: subscription management
        cname: 订阅方管理
        value: 'subscription'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/service/approval/subscribes"
              - "GET:/api/v1/service/approval/subscribe"
              - "GET:/api/v1/service/subscribers"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/service/approval/subscribe"
              - "POST:/api/v1/service/subscriber"
              - "DELETE:/api/v1/service/subscriber"
      - name: service
        cname: 服务管理
        value: 'service'
        children:
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "PUT:/api/v1/service/info"
              - "POST:/api/v1/team/service"
              - "DELETE:/api/v1/team/service"
  - name: application
    cname: 应用
    value: 'application'
    children:
      - name: subscription Service
        cname: 订阅服务
        value: 'subscription'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/application/subscriptions"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/catalogue/service/subscribe"
              - "POST:/api/v1/application/subscription/cancel"
              - "POST:/api/v1/application/subscription/cancel_apply"
      - name: authorization
        cname: 访问授权
        value: 'authorization'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/app/authorization"
              - "GET:/api/v1/app/authorizations"
              - "GET:/api/v1/app/authorization/details"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/app/authorization"
              - "PUT:/api/v1/app/authorization"
              - "DELETE:/api/v1/app/authorization"
      - name: application
        cname: 应用
        value: 'application'
        children:
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "PUT:/api/v1/app/info"
              - "POST:/api/v1/team/app"
              - "DELETE:/api/v1/app"
  - name: team
    cname: 团队
    value: 'team'
    children:
      - name: member
        cname: 成员
        value: 'member'
        children:
          - name: view
            cname: 查看
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/team/members"
              - "GET:/api/v1/team/members/toadd"
          - name: manager
            cname: 管理
            value: 'manager'
            apis:
              - "POST:/api/v1/team/member"
              - "DELETE:/api/v1/team/member"
              - "PUT:/api/v1/team/member/role"
      - name: team
        cname: 团队管理
        value: 'team'
        children:
          - name: view
            cname: '查看'
            value: 'view'
            guest_allow: true
            apis:
              - "GET:/api/v1/manager/teams"
              - "GET:/api/v1/manager/team"
          - name: manager
            cname: '管理'
            value: 'manager'
            apis:
              - "POST:/api/v1/manager/team"
              - "PUT:/api/v1/manager/team"
              - "DELETE:/api/v1/manager/team"