Managing users¶
A user an identity used to access Altair SLC Hub. A user can have roles and permissions associated with it that define the types of tasks it can perform.
Creating a user¶
A user is created using the hubcli create user statement.
The minimum information you need to provide to create a user is the username and password:
hubcli create user Author1 --password longpassword12
If the password does not meet the Altair SLC Hub password rules, a message is returned informing you that the password is invalid. You need to use the command again with a suitable password.
The user name you supply is also by default used as the display name in the Hub portal. You can specify a different display name for a user if required. This can be useful if you want to use condensed user names for commands, but want to use more informative names that can be helpful in output such as the Altair SLC Hub Portal. You can also specify an email address to which Altair SLC Hub can send information, for example to reset the user password. For example:
hubcli user create Author1 --displayName "Documentation user 1" --email "[email protected]" --password longpassword12
The --displayname flag is used to set the display name to Documentation user 1,
while --email argument specifies the email address for the user.
Adding users to a group¶
You can add users to a group. This enables you to group together users who undertake similar tasks or require similar permissions.
You can list groups using the hubcli group list command.
If you want to check you have the correct user name, or want to view a list of users, you can use the hubcli user list command, as described in hubcli user list.
A list of users is returned to the local device.
You can add a user to a group using the hubcli group member add command; for example:
hubcli group member add --user Author1 group1
The user Author1 is added to the group group1.
You can check the user has been successfully added by listing the members of a group:
hubcli group member list group1
This command lists the members of group1.
Removing users¶
You might want to remove a user from Altair SLC Hub. You can do this with the hubcli user rm command.
If you want to check you have the correct user name, or want to view a list of users,
you use the command hubcli user list, described above.
You can then remove the user by name; for example:
hubcli user rm user1
This removes the user user1.
You cannot remove the user name you have used to login and use hubcli.
For example, if you have logged in as AdminUser, you cannot use the command:
hubcli user rm AdminUser
if you do, the following message is returned:
Forbidden : Cannot delete yourself
Removing users from a group¶
You can remove a user from a group. You can do this with the hubcli group member rm command.
If you want to check you have the correct group name, or want to view a list of groups,
you use the command hubcli group list, as described in hubcli group list.
You can then remove the user by name; for example:
hubcli group member rm --user Author1 group1