Skip to content

Team User Accounts: Enabling

Matthew Gallina edited this page Dec 21, 2018 · 6 revisions

To save on individual installations across your development / QA teams, sMockin can be run in multi user mode enabling the creation of user accounts.


Enabling Multi User Mode:

  • 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'"


Access

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.


Distinguishing User Mocks

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:

Any mocks created by the system admin user will continue to be accessible directly from the root context path /hello like so: