-
Notifications
You must be signed in to change notification settings - Fork 24
Team User Accounts: Enabling
To save on individual installations across your development / QA teams, sMockin can be run in multi user mode enabling the creation of user accounts.
- Shutdown sMockin if running (e.g ./shutdown.sh)
- Locate .smockin config directory within the user home directory of your hosting server
- Within here locate and open the file app.properties (i.e $USER_HOME/.smockin/app.properties)
- Add / Amend the MULTI_USER_MODE argument setting this to true (e.g MULTI_USER_MODE = TRUE)
- Save your change and start up sMockin (e.g ./start.sh)
You can verify Multi User Mode is enabled by looking for the below message in the terminal window:
"The application is running in 'Multi User Mode'"
Once started in this mode, the sMockin dashboard will only be accessible by logging in with user credentials.
You can login and begin creating other user accounts using the default system admin account:
- username: admin
- password: admin
Please note any mocks that we're created prior to enabling 'Multi User Mode' will be automatically owned by the 'system admin' user.
In multi user mode mock endpoints are uniquely distinguished between users by being served from a context path based on the user's username.
To give an example of this, say the user bob creates the mock HTTP endpoint GET /hello, once the mock server has been started this mock will be accessible from the endpoint /bob/hello like so:
- curl -i -X GET http://localhost:8001/bob/hello
Any mocks created by the system admin user will continue to be accessible directly from the root context path /hello like so:
- curl -i -X GET http://localhost:8001/hello