001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.security.permission;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Group;
020    import com.liferay.portal.model.Organization;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    @ProviderType
026    public interface PermissionCheckerBag extends UserPermissionCheckerBag {
027    
028            public long[] getRoleIds();
029    
030            /**
031             * @deprecated As of 6.1.0, renamed to {@link
032             *             #isGroupAdmin(PermissionChecker, Group)}
033             */
034            @Deprecated
035            public boolean isCommunityAdmin(
036                            PermissionChecker permissionChecker, Group group)
037                    throws Exception;
038    
039            /**
040             * @deprecated As of 6.1.0, renamed to {@link
041             *             #isGroupOwner(PermissionChecker, Group)}
042             */
043            @Deprecated
044            public boolean isCommunityOwner(
045                            PermissionChecker permissionChecker, Group group)
046                    throws Exception;
047    
048            public boolean isContentReviewer(
049                            PermissionChecker permissionChecker, Group group)
050                    throws Exception;
051    
052            public boolean isGroupAdmin(
053                            PermissionChecker permissionChecker, Group group)
054                    throws Exception;
055    
056            public boolean isGroupMember(
057                            PermissionChecker permissionChecker, Group group)
058                    throws Exception;
059    
060            public boolean isGroupOwner(
061                            PermissionChecker permissionChecker, Group group)
062                    throws Exception;
063    
064            public boolean isOrganizationAdmin(
065                            PermissionChecker permissionChecker, Organization organization)
066                    throws Exception;
067    
068            public boolean isOrganizationOwner(
069                            PermissionChecker permissionChecker, Organization organization)
070                    throws Exception;
071    
072    }