My goal is to hide some (or all) tabs (assignments, inducements, etc) for some users/roles when they try to edit information about a user. I tried to use the example "Show Only Some Default Forms":
The configuration changes nothing at all. So I tested this example by putting the code inside System configuration to make sure it applies to everyone and it still did not change a thing.
I tried all sorts of configurations and eventually I decided to pull the code out as something clearly is not working.
I found out that class FocusTabVisibleBehavior, method isVisble() is loading all default tabs if it fails to find any adminGuiConfiguration that specifies what forms should be shown. I tried commenting this part out and define what tabs should be added in system configurations (using the example configuration I mentioned above). It fails to recognize the default tabs I added to the configuration XML and user (as well as roles, orgs, etc) edit window shows no tabs at all.
So the conclusion is that I can not control default tabs at all because midpoint fails to recognize them in the configurations.
Here is the objectForm part that I place inside configuration.