---
# System prepended metadata

title: ROLEs in Gateway

---

# ROLEs in Gateway

```ruby

# A map of roles to granted access rights
#
ROLE_ACCESS_RIGHTS_MAP = {
  admin:      [ "*/*" ],
  operators:  %w[
    */list
    */show
    */broadcast
    */cancel
    partners/*
    entities/*
    approvals.methods/*
    api.keys/*
    api.roles/*
    bookkeeping.wallets/*
    bookkeeping.accounts/*
    assets/*
    wallets.*.assets/*
    compliance.rules/*
    callbacks.endpoints/*
    audit.patterns/*
    wallets.curv.*/*
  ],
  auditor:    ["*/list", "*/show" ],
  backoffice: BACKOFFICE_ACTIONS
}.freeze

BACKOFFICE_ACTIONS = %w[
  approvals.methods/list
  approvals.methods/show
  assets/list
  assets/show
  bookkeeping.accounts/list
  bookkeeping.accounts/show
  bookkeeping.addresses/list
  bookkeeping.addresses/show
  compliance.cases/complete
  compliance.cases/list
  compliance.cases/review
  compliance.cases/show
  compliance.transactions/list
  compliance.transactions/show
  compliance.transactions/unlock
  compliance.*/*
  entities/list
  entities/lock
  entities/show
  entities/unlock
  partners/list
  partners/show
].freeze
```


# Pagination

`?pagination[size]=100&pagination[page]=1`


# Filtering

`?filter[entity_id]=003410023&filter[state][]=PENDING&filter[state][]=FAILED`

`?filter[created_at][greater]=...`

`?filter[created_at][gte]=...&filter[created_at][lt]=....`

```ruby
{ 
  filter: {
    entity_id: "003410023",
    state: ['PENDING', 'FAILED'],
    created_at: { 
      gte: "...",
      lt: "..."
    }
  }
}

```

# Sorting

`?sort[]=created_at%20desc&sort[]=id%20asc`