refreshAcls not working, but populateAcl works

#1

I use the following command for refreshAcls. I see the batchqueue build up and empty without errors, but my Organization’s acl is not updated.

Organization.refreshAcls({filter: "contains(parentOrgs, 'test_org')", async: true})

this will work however with async: false

Also, when I do the following, it does work…

Organization.populateAcl(Organization.fetch({filter: "contains(parentOrgs,'test_org')"}).objs)

What’s going on here?

#2

May be async processing is disabled in your environment, i.e. AsyncProcessingDisabled is set to true.

#3

Async processing is enabled

#4

May be the batch job that refreshes ACLs finished with errors, you can check the run status with

> job = Organization.refreshAcls({filter: "contains(parentOrgs, 'test_org')", async: true})
> c3Grid(RefreshAclsBatchJob.fetch({filter: Filter.eq('id', job.id)}))
#5

Oh that’s good debugging advice. Wasn’t aware of that type…
Finishes without errors, but now that I look at RefreshAclsBatchJob, I see this populated in the options…

options:
    objTypeRef:
        moduleName: -type-Organization
        typeName: Organization

I know that the moduleName on my EnableAclPrivilege for Organization is not “-type-Organization”
Unfortunately, c3ShowType(RefreshAclsBatchJob) has very little documentation for the options field…

options: [Obj] inherited
    options for this Batch Job

Documentation for moduleName is also lacking…

moduleName: [string]
    Declaration 
       moduleName: string