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 extends Cloneable {
025
026 public static final long[] DEFAULT_ROLE_IDS = {};
027
028 public PermissionChecker clone();
029
030 public long getCompanyId();
031
032 public long getOwnerRoleId();
033
034 public long[] getRoleIds(long userId, long groupId);
035
036 public long getUserId();
037
038 public boolean hasOwnerPermission(
039 long companyId, String name, long primKey, long ownerId,
040 String actionId);
041
042 public boolean hasOwnerPermission(
043 long companyId, String name, String primKey, long ownerId,
044 String actionId);
045
046 public boolean hasPermission(
047 long groupId, String name, long primKey, String actionId);
048
049 public boolean hasPermission(
050 long groupId, String name, String primKey, String actionId);
051
052 public boolean hasUserPermission(
053 long groupId, String name, String primKey, String actionId,
054 boolean checkAdmin);
055
056 public void init(User user, boolean checkGuest);
057
058 public boolean isCheckGuest();
059
060 public boolean isCommunityAdmin(long groupId);
061
062 public boolean isCommunityOwner(long groupId);
063
064 public boolean isCompanyAdmin();
065
066 public boolean isCompanyAdmin(long companyId);
067
068 public boolean isOmniadmin();
069
070 public boolean isSignedIn();
071
072
075 public void resetValues();
076
077 public void setCheckGuest(boolean checkGuest);
078
079
082 public void setValues(PortletRequest portletRequest);
083
084 }