Diana,
It is true that in certain scenarios it would be desired to switch flavor by a script without the user actually being allowed to manually selecting a flavor via the Personas toolbar. However, the basic premise of Personas scripting is that no action can be perfomed by the script that the user otherwise couldn't do. This will not change.
So it sounds like there should be some authorization value which doesn't show the toolbar when the flavor switching authorization is granted. Currently there is no such setting. There is talk about a solution for this situation but no decision has been made how / if / when will this be possible.
In the meantime, you could do the following:
Copy the personas service to a new name (like z_personas or something). For this service, you can specify the additional parameter sap-personas-hidden with the value X. Then you would provide the Personas URL to your end users with this service instead of the standard. You should certainly grant them the authorization to 'manage flavor'.
This will result in the scripted switch flavor action working but there would be no Personas P shown to these users.
Of course nothing stops the user from changing the service name in the URL to the standard personas and thereby getting the Personas toolbar, but remember that Personas is not a security tool, so it shouldn't be used to control access to the system. A savvy user could manipulate the URL anyway and do certain things you wouldn't want them to do...