001
014
015 package com.liferay.portal.security.permission;
016
017 import com.liferay.portal.model.User;
018
019 import javax.portlet.PortletRequest;
020
021
024 public interface PermissionChecker {
025
026 public static final long[] DEFAULT_ROLE_IDS = new long[] {0};
027
028 public long getCompanyId();
029
030 public long getOwnerRoleId();
031
032 public long[] getRoleIds(long userId, long groupId);
033
034 public long getUserId();
035
036 public boolean hasOwnerPermission(
037 long companyId, String name, long primKey, long ownerId,
038 String actionId);
039
040 public boolean hasOwnerPermission(
041 long companyId, String name, String primKey, long ownerId,
042 String actionId);
043
044 public boolean hasPermission(
045 long groupId, String name, long primKey, String actionId);
046
047 public boolean hasPermission(
048 long groupId, String name, String primKey, String actionId);
049
050 public boolean hasUserPermission(
051 long groupId, String name, String primKey, String actionId,
052 boolean checkAdmin);
053
054 public void init(User user, boolean checkGuest);
055
056 public boolean isCommunityAdmin(long groupId);
057
058 public boolean isCommunityOwner(long groupId);
059
060 public boolean isCompanyAdmin();
061
062 public boolean isCompanyAdmin(long companyId);
063
064 public boolean isOmniadmin();
065
066 public void resetValues();
067
068 public void setCheckGuest(boolean checkGuest);
069
070 public void setValues(PortletRequest portletRequest);
071
072 }