Manage users and groups in P4 Server
To create P4 DAM users, see Create users.
To perform these tasks on the P4 Server side, see the following topics in the P4 Server Administration Documentation:
- Managing users for information on user types, adding new licensed users, and renaming users
- Authorizing access for information on the protections table and setting permission levels for users
- Granting access to groups of users for information on creating and editing groups
HTH-//<depot-path>/<repo-path>-<HTH_ACCESS_LEVEL>
HTH-<depot-name>-<hth_access_level>
HTH-<company-administrator>
Enable synchronization of P4 users in P4 DAM
To automatically give all P4 Server users access to P4 DAM, select the checkbox. To do this, either:
-
In the P4 DAM admin UI, go to Preferences > P4 Server > Account and group synchronization.
-
In the
/var/opt/hth/shared/hth.jsonconfiguration file, change the setting.
When the Enable synchronisation of P4 Server users in P4 DAM checkbox is selected:
-
You cannot give non-P4 users access to P4 DAM.
-
You cannot create or deactivate a user manually.
If you do not have enough P4 DAM licenses for all your P4 Server users, or if you want to exclude users and groups from accessing P4 DAM, see Including and excluding P4 Server users and groups.
Including and excluding P4 Server users and groups
You might want to include users or groups, or one or more users in a group, that exist in P4 Server to be available in P4 DAM, or exclude them from being displayed. This is possible by configuring the respective keys. To do this, either:
-
In the P4 DAM admin UI, go to Preferences > P4 Server > Account and group synchronization.
-
In the
/var/opt/hth/shared/hth.jsonconfiguration file, change the setting.
For details on these keys, see Section: helix in P4 DAM configuration.
- P4 DAM bots are created as users on the P4 Server.
- The include/exclude configuration applies to bots in the same way as it does for other users.
-
Add the users to the appropriate groups before updating the include/exclude configuration.
- Update the include/exclude configuration before managing users, bots, and groups in the P4 DAM admin UI.
When synchronizing users, P4 DAM proceeds in the following order. P4 DAM:
- Includes direct users and bots
- Adds users and bots from groups
- Excludes users and bots from groups
- Excludes direct users and bots
When synchronizing groups, P4 DAM first includes groups and then extracts any groups that are marked as excluded in the configuration.
To include or exclude P4 Server users or groups:
-
In the Preferences view, under Account and group synchronization, enter the name of users or groups as needed.
For example:
To include the users called user1 and user2, enter the following in the Include users field: ^(user1|user2)$
To include users from a group called perforce-group, enter the following in the Include users from groups field: ^perforce-group$
For details and more examples, see Section: helix.
-
Click Save preferences.
A warning appears because the changes have not been applied to the P4 DAM server yet. Perform the following step to finalize the configuration.
-
To apply server configuration changes to the P4 DAM server, connect to the server via SSH and run the following command:
sudo hth-ctl reconfigure
-
After successfully running the reconfigure command, reload the P4 DAM admin UI.
Failure to run thehth-ctl reconfigurecommand might result in normal web server interruption messages, such as the HTTP Error 503. The service is unavailable. error, because the services come back online.
JSON configuration examples
This following includes examples of how to exclude groups and users by editing the "helix" key in the /var/opt/hth/shared/hth.json file. Excluding groups and users works exactly the same way, so you can apply the following examples to all cases.
To exclude all groups starting with external- or test- or ending with test:
^(external-|test-).*, test$
To exclude user1 and user2, and any user starting or ending with test:
^(user1|user2)$, test$, ^test
Following is a code snippet from the hth.json file with these values included under the "helix" key:
"users_include_regex": "", "users_exclude_regex": "^(user1|user2)$, test$, ^test", "users_from_groups_include_regex": "", "users_from_groups_exclude_regex": "", "groups_include_regex": "", "groups_exclude_regex": "^(external-|test-).*, test$"