Is this in version 2.5? If so, try getting a sudo context (i.e. a context with all rights) using this code:
IContext sudoContext = getContext().getSudoContext();
For 2.4, use the following code:
IContext sudoContext = Core.getSystemContext();
Then set changes and commit using this context:
Core.commit(sudoContext, currentCustomer.getMendixObject());