Search code examples
windows-10perforce

How to protect Helix Perforce/p4 to not allow create new users?


I have an installed P4-server for Windows 10 for personally usage. Now I want to include my friend to my project and want to let my p4 server be visible to the public internet.

Now everyone is allowed to create new users, they just need the ip and port to access to create new users and get access to all files..

Is it possible to disable the "New..." in the p4 "Open Connection" dialog?

enter image description here


Solution

  • There are two methods, both of which can only be done by an admin (super user).

    1. Set up your protection table to ensure that only explicitly named users have permission to run any command that would entail user creation. This is easily done by replacing any user * lines in p4 protect with group * and making sure that all existing users are in a group.
    2. Set dm.user.noautocreate to 2 so that users can only be created by a superuser.

    I prefer (1) because it potentially allows you to delegate user creation to (non-admin) group owners, but (2) is sometimes preferred by admins who have a wide-open protection table and don't want to have to think about managing it at all.