Robert von Burg
48caa84903
Simplified the API, removed the privileged user - now always use the agent system user for running system actions. One method has no return value and one has a return value. Now it is easy to perform a system action using: runAsAgent(ctx -> { // do work }); String result = runAsAgentWithResult(ctx -> { // do work return "done"; }); // execute a SystemAction runAsAgent(action); // execute a SystemActionWithResult String result = runAsAgentWithResult(actionWithResult); |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
LICENSE | ||
README.md | ||
pom.xml |
README.md
li.strolch.service
Service API for Strolch
Running tests
Start PostgreSQL console and create the users:
$ sudo -u postgres psql
$ postgres=#
create user cacheduser with password 'test';
create database cacheduserdb;
GRANT ALL PRIVILEGES ON DATABASE cacheduserdb to cacheduser;
GRANT CONNECT ON DATABASE cacheduserdb TO cacheduser;
create user transactionaluser with password 'test';
create database transactionaluserdb;
GRANT ALL PRIVILEGES ON DATABASE transactionaluserdb to transactionaluser;
GRANT CONNECT ON DATABASE transactionaluserdb TO transactionaluser;
You can revoke the privileges with the following:
revoke ALL PRIVILEGES ON DATABASE cacheduserdb from cacheduser;
drop user cacheduser;
drop database cacheduserdb;
revoke ALL PRIVILEGES ON DATABASE transactionaluserdb from transactionaluser;
drop user transactionaluser;
drop database transactionaluserdb;