In your case you have to use ResourceConstants.SCOPE_INDIVIDUAL
How do I get a Scope value in LIferay
Question
I have the following call in a portlet MVC class in liferay:
ResourcePermissionServiceUtil.addResourcePermission(
themeDisplay.getScopeGroupId(),
themeDisplay.getCompanyId(),
FileEntry.class.getName(),
??, //scope int value... how do I get this??
Long.toString( fileEntry.getPrimaryKey()),
RoleServiceUtil.getRole(themeDisplay.getCompanyId(), "Guest").getPrimaryKey(),
ActionKeys.VIEW);
I would like to know how to get the scope value. Preferably a global scope value.
La solution
Autres conseils
The answer is ResourceConstants in liferay.
ResourceConstants.SCOPE_COMPANY
There are other scopes of course but that is the object that houses the constants.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow