There may be cases where you don't want some users to be able to deploy to certain servers in a project. For example, you may have a production server that you only want one particular user to be able to deploy to, but you're happy for any user to deploy to testing and staging.
Setting up user restrictions
In DeployHQ, an individual user can have a number of different restrictions set on a project. To get started, head to Settings at the top of the screen, then User Management on the left hand side.
You'll see a list of users with an indication of their user level, showing if they're an admin, or have access to a certain number of projects.
Click on an individual user to edit them, then you can view a number of restrictions.
In this case, we've removed restrictions from main permissions, and removed the ability to access all current and future projects. Once that has been done, a list of projects can be individually managed. Any projects already assigned will be listed, and a dropdown will be displayed below that, where you can select additional projects to assign.
Within a project in that list, you can leave the User can deploy to any server or group, when by default disables all access to be able to deploy any other servers.
Assigning users to servers
To then go ahead and add access to a specific server, you'll need to head to the project in question, then the Servers and Groups link on the left hand side. From there, click a server to edit it, then scroll to the bottom to open the User Permissions section:
Any user that has access to the project and all of its servers will be displayed automatically.
You can select users that can access the project, but not all servers in the dropdown below, to assign access to this server specifically. Once you've applied that change, the user will only be able to deploy to that server.
If you have any questions about this or any other aspect of the DeployHQ service, please get in touch.