Disable acl control on c3 type


#1

Hi, I’m trying to remove some record in Service table, launching the command

Service.remove(“id_to_remove”)

But I receive the following error

Error: Write failed: User: laura.minicucci@aubay.it is not authorized to update Object ‘id_to_remove’ of type Service…

Even launching the populateAcl I have the error.

There is a way to disable the Acl control?

Thanks,
Laura


#2

What you can do is look if there are any ACLs on the Service type, with:

c3Grid(EnableAclPrivilege.fetch({filter: Filter.eq('typeName', 'Service')}))

If there are any, then what you can do is temporarly disable them with

EnableAclPrivilege.merge({id: "find-the-name-related-to-type-service", enabled: false})

It may not take effect immediately, then try to update the ACLs on your serivces with

Service.refreshAcls()