lib/mbaas.js
function resolvePermission(params) {
  var dbPermissions = mBaaS.permission_map.db;
  if (params.act && dbPermissions && dbPermissions[params.act]) {
    params.requestedPermission = dbPermissions[params.act].requires;
  }
}
function resolvePermission(params) {
  var dbPermissions = mBaaS.permission_map.db;
  if (params.act && dbPermissions && dbPermissions[params.act]) {
    params.requestedPermission = dbPermissions[params.act].requires;
  }
}
function resolvePermission ( params ) { var dbPermissions = mBaaS . permission_map . db ; if ( params . act && dbPermissions && dbPermissions [ params . act ] ) { params . requestedPermission = dbPermissions [ params . act ] . requires ; } }
DB actions are bound to specific permissions. For example the `list` action
requires only read permissions while `update` requires write. Those permissions
are configured in the `permission-map` of fh-db. If the given action has a
permission set we will add that to the params, otherwise we ignore it.

@param params Request parameter object
DB actions are bound to specific permissions . For example the list action requires only read permissions while update requires write . Those permissions are configured in the permission - map of fh - db . If the given action has a permission set we will add that to the params otherwise we ignore it .