Error "Someone may be trying to circumvent the permission checker" when deleting a virtual instance
Written By
Jamilly Macedo
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- When attempting to delete a virtual instance, users may encounter the following error:
javax.portlet.PortletException: com.liferay.portal.kernel.exception.SystemException: java.lang.IllegalArgumentException: Someone may be trying to circumvent the permission checker: {companyId=12345, name=com.liferay.document.library, primKey=com.liferay.document.library, scope=4}
at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand.processAction(BaseMVCActionCommand.java:69)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:378)
at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:88)
(...)
Caused by: com.liferay.portal.kernel.exception.SystemException: java.lang.IllegalArgumentException: Someone may be trying to circumvent the permission checker: {companyId=12345, name=com.liferay.document.library, primKey=com.liferay.document.library, scope=4}
at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:340)
at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86)
at com.liferay.portal.service.impl.CompanyLocalServiceImpl.doDeleteCompany(CompanyLocalServiceImpl.java:1441)
(...)
Caused by: java.lang.IllegalArgumentException: Someone may be trying to circumvent the permission checker: {companyId=12345, name=com.liferay.document.library, primKey=com.liferay.document.library, scope=4}
at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasUserPermissionImpl(AdvancedPermissionChecker.java:1526)
at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasPermissionImpl(AdvancedPermissionChecker.java:1482)
at com.liferay.portal.security.permission.AdvancedPermissionChecker.hasPermission(AdvancedPermissionChecker.java:306)
at com.liferay.portal.security.permission.BasePermissionChecker.hasPermission(BasePermissionChecker.java:114)
(...)
Resolution
- This error occurs due to the necessity of deleting all repositories within the virtual instance before it can be successfully removed.
-
To resolve this issue, we need to run the
deleteRepositories.groovy.
- The script only operates on one instance. We should edit the variable
VirtualInstanceCompanyId for that instance to apply the script successfully.
Did this article resolve your issue ?