I segment my users across organisations. A user can only belong to one organisation. Form access is governed by group membership specific to an organisation and forms are pre-populated based on which organisation they belong.
We need to be able to easily move users between organisations and update their group membership at the same time. I can script group membership, and I can add someone to an organisation. What I can't figure out is how to remove a user from an organisation. Is this possible?
FYI - I'm not using fluent.
How are you adding a user to and organisation?
Have you tried Client.removeFromClientUsers()?
Hi Ben. I hadn't seen that function - thanks I'll give it a try.
I've adding users to clients using:
userClient = DaoFactory.getClientDao().getClientByCode(project) def clientUser = new ClientUser(); clientUser.setClient(userClient) clientUser.setUser(user)