Liferay 7 remote service access denied

3.1k Views Asked by At

liferay 7

I have a remote service for one of my service builder entity and I would like to create a method accessible without any authentication (no p_auth parameter or authentication header).

I added the @AccessControlled(guestAccessEnabled = true) to my method but it does not seem to work as it should. When I click "Execute" button I got an exception :

    "Access denied to package.classname#methodName"

Is it a known bug?

Thank you!

1

There are 1 best solutions below

4
On

Could you please try to navigate to your Liferay Portal’s Control Panel and click on Service Access Policy under the Configuration heading. Here, you can see the default service access policies and you can add new ones. This step helped me in solving a very similar case where I faced the "Access denied" error.

For more information please visit:

[https://help.liferay.com/hc/en-us/articles/360017896072-Service-Access-Policies]

I hope you will find all this useful,

Best Regards, Peter