Fixes AI-695, AI-691: Functions for managing users and partners

Added updateUserPermissions(), addPartner(), copyPartners(), copyUsers()
Also added start of integration tests that can be included in build