**Axon.ivy 7.0 and newer**
There is a convenience checkbox on the 'Script Activity' below the code block which will turn of permission check completely. Just hit it and fire your administrative API call here.
https://developer.axonivy.com/doc/latest/DesignerGuideHtml/ivy.processmodeling.html#ivy-processmodels-elements-tabs-code
**All Versions**
You can disable Xpert.ivy Security checks with the following code:
import java.util.concurrent.Callable;
import ch.ivyteam.ivy.server.ServerFactory;
public class AdministrationTask
{
public static void doAdminTask() throws Exception
{
ServerFactory.getServer().getSecurityManager().executeAsSystem(new Callable<Void>(){
@Override
public Void call() throws Exception {
// Implement your code here. Permission checks are disabled in this method.
return null;
}});
}
}
Note that the method is called `executeAsSystem(...)`. There is a similar method on the ISecurityContext called `executeAsSystemUser(...)`. The difference between the two methods is that `executeAsSystem(...)` disables all permission checks whereas `executeAsSystemUser(...)` executes the code as user SYSTEM with permission checks enabled. With `executeAsSystemUser(...)` if the SYSTEM user does not own a necessary permission then Xpert.ivy will also throw a PermissionDeniedException. Whereas with `executeAsSystem(...)` no PermissionDeniedException will ever by thrown.