status-go/services/permissions
Dmitry Shulyak 9723b64827
Permissions api (#1524)
* Add permissions api

* Integrate permissions service

* Reduce cyclomatic complexity of the MakeNode function
2019-07-21 08:41:30 +03:00
..
migrations Permissions api (#1524) 2019-07-21 08:41:30 +03:00
README.md Permissions api (#1524) 2019-07-21 08:41:30 +03:00
api.go Permissions api (#1524) 2019-07-21 08:41:30 +03:00
api_test.go Permissions api (#1524) 2019-07-21 08:41:30 +03:00
database.go Permissions api (#1524) 2019-07-21 08:41:30 +03:00
service.go Permissions api (#1524) 2019-07-21 08:41:30 +03:00

README.md

Dapps permissions service

To enable:

{
  "PermissionsConfig": {
    "Enabled": true,
  },
  APIModules: "permissions"
}

API

permissions_addDappPermissions

Stores provided permissions for dapp. On update replaces previous version of the object.

{
  "dapp": "first",
  "permissions": [
    "r",
    "x"
  ]
}

permissions_getDappPermissions

Returns all permissions for dapps. Order is not deterministic.

permissions_deleteDappPermissions

Delete dapp by a name.