1
14
15 package com.liferay.portal.security.permission;
16
17 import com.liferay.portal.model.User;
18
19 import javax.portlet.PortletRequest;
20
21
26 public interface PermissionChecker {
27
28 public static final long[] DEFAULT_ROLE_IDS = new long[] {0};
29
30 public long getCompanyId();
31
32 public long getOwnerRoleId();
33
34 public long[] getRoleIds(long userId, long groupId);
35
36 public long getUserId();
37
38 public boolean hasOwnerPermission(
39 long companyId, String name, long primKey, long ownerId,
40 String actionId);
41
42 public boolean hasOwnerPermission(
43 long companyId, String name, String primKey, long ownerId,
44 String actionId);
45
46 public boolean hasPermission(
47 long groupId, String name, long primKey, String actionId);
48
49 public boolean hasPermission(
50 long groupId, String name, String primKey, String actionId);
51
52 public boolean hasUserPermission(
53 long groupId, String name, String primKey, String actionId,
54 boolean checkAdmin);
55
56 public void init(User user, boolean checkGuest);
57
58 public boolean isCommunityAdmin(long groupId);
59
60 public boolean isCommunityOwner(long groupId);
61
62 public boolean isCompanyAdmin();
63
64 public boolean isCompanyAdmin(long companyId);
65
66 public boolean isOmniadmin();
67
68 public void resetValues();
69
70 public void setCheckGuest(boolean checkGuest);
71
72 public void setValues(PortletRequest portletRequest);
73
74 }