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    import com.liferay.portal.model.Role;
022    
023    import java.util.List;
024    
025    /**
026     * @author Brian Wing Shun Chan
027     */
028    @ProviderType
029    public interface PermissionCheckerBag extends UserPermissionCheckerBag {
030    
031            public long[] getRoleIds();
032    
033            public List<Role> getRoles();
034    
035            /**
036             * @deprecated As of 6.1.0, renamed to {@link
037             *             #isGroupAdmin(PermissionChecker, Group)}
038             */
039            @Deprecated
040            public boolean isCommunityAdmin(
041                            PermissionChecker permissionChecker, Group group)
042                    throws Exception;
043    
044            /**
045             * @deprecated As of 6.1.0, renamed to {@link
046             *             #isGroupOwner(PermissionChecker, Group)}
047             */
048            @Deprecated
049            public boolean isCommunityOwner(
050                            PermissionChecker permissionChecker, Group group)
051                    throws Exception;
052    
053            public boolean isContentReviewer(
054                            PermissionChecker permissionChecker, Group group)
055                    throws Exception;
056    
057            public boolean isGroupAdmin(
058                            PermissionChecker permissionChecker, Group group)
059                    throws Exception;
060    
061            public boolean isGroupMember(
062                            PermissionChecker permissionChecker, Group group)
063                    throws Exception;
064    
065            public boolean isGroupOwner(
066                            PermissionChecker permissionChecker, Group group)
067                    throws Exception;
068    
069            public boolean isOrganizationAdmin(
070                            PermissionChecker permissionChecker, Organization organization)
071                    throws Exception;
072    
073            public boolean isOrganizationOwner(
074                            PermissionChecker permissionChecker, Organization organization)
075                    throws Exception;
076    
077    }