001    /**
002     * Copyright (c) 2000-2013 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.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    }