Since I upgraded my plugin from dmx 5.1 to 5.2 I have trouble with previously working code. The code does the following. In the application there can be an application-wide administration user. For this user to have write privileges everywhere there is a specific function that sets this privilege. The actual implementation takes all possible workspaces that the app-admin needs and creates a membership. This function is itself privileged, of course, and is only supposed to work when logged in as (DMX) admin.
However in DMX 5.2 the membership creation fails because apparently the DMX admin has no write privilege to the workspaces. This may be true but how I am supposed to create this membership then?
The function I am using is AccessControlService.createMemberShip(userName, workspaceId)
UserName is my app-admin, workspace Id is one of the many possible workspaces that exist in the application.