diff --git a/README.md b/README.md index 97bf058a2f..9ba37b8fdc 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ API 0 is accessible using regular JSON-RPC: Accessing restricted API's -------------------------- -You can restrict API's to particular users by specifying an `apiaccess` file in `config.ini`. Here is an example `apiaccess` file which allows +You can restrict API's to particular users by specifying an `api-access` file in `config.ini` or by using the `--api-access /full/path/to/api-access.json`. Here is an example `api-access` file which allows user `bytemaster` with password `supersecret` to access four different API's, while allowing any other user to access the three public API's necessary to use the wallet: diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 02b623d27a..c11825721b 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -456,9 +456,12 @@ namespace detail { _force_validate = true; } - if( _options->count("api-access") ) + if( _options->count("api-access") ) { _apiaccess = fc::json::from_file( _options->at("api-access").as() ) .as(); + ilog( "Using api access file from ${path}", ("path", _options->at("api-access").as().string()) ); + } + else { // TODO: Remove this generous default access policy