In UE, we need to detect the P4 user group, but there’s no such operation in the PerforceSourceControl module. Therefore, we need to create our own SourceControlOperation and PerforceSourceControlWorker, and then add the worker to the WorkersMap in PerforceSourceControl/Source/PerforceSourceControl/Private/PerforceSourceControlOperations.cpp. This requires modifying the engine code.
In other providers, such as GitSourceControlProvider, the method for registering a worker is parameterised. Would it be possible to implement something similar for Perforce, or is there another recommended way to register additional operations?