문제

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.

도움이 되었습니까?

해결책

In your case you have to use ResourceConstants.SCOPE_INDIVIDUAL

다른 팁

The answer is ResourceConstants in liferay.

ResourceConstants.SCOPE_COMPANY

There are other scopes of course but that is the object that houses the constants.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top