001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.security.membershippolicy;
016    
017    import com.liferay.portal.model.Organization;
018    import com.liferay.portlet.asset.model.AssetCategory;
019    import com.liferay.portlet.asset.model.AssetTag;
020    
021    import java.io.Serializable;
022    
023    import java.util.List;
024    import java.util.Map;
025    
026    /**
027     * @author Roberto D??az
028     * @author Sergio Gonz??lez
029     */
030    public class DummyOrganizationMembershipPolicy
031            extends BaseOrganizationMembershipPolicy {
032    
033            @Override
034            public void checkMembership(
035                    long[] userIds, long[] addOrganizationIds,
036                    long[] removeOrganizationIds) {
037            }
038    
039            @Override
040            public boolean isMembershipAllowed(long userId, long groupId) {
041                    return true;
042            }
043    
044            @Override
045            public boolean isMembershipRequired(long userId, long groupId) {
046                    return false;
047            }
048    
049            @Override
050            public boolean isRoleAllowed(long userId, long groupId, long roleId) {
051                    return true;
052            }
053    
054            @Override
055            public boolean isRoleRequired(long userId, long groupId, long roleId) {
056                    return false;
057            }
058    
059            @Override
060            public void propagateMembership(
061                    long[] userIds, long[] addOrganizationIds,
062                    long[] removeOrganizationIds) {
063            }
064    
065            @Override
066            public void verifyPolicy(Organization organization) {
067            }
068    
069            @Override
070            public void verifyPolicy(
071                    Organization organization, Organization oldOrganization,
072                    List<AssetCategory> oldAssetCategories, List<AssetTag> oldAssetTags,
073                    Map<String, Serializable> oldExpandoAttributes) {
074            }
075    
076    }