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            public void checkMembership(
034                    long[] userIds, long[] addOrganizationIds,
035                    long[] removeOrganizationIds) {
036            }
037    
038            @Override
039            public boolean isMembershipAllowed(long userId, long groupId) {
040                    return true;
041            }
042    
043            @Override
044            public boolean isMembershipRequired(long userId, long groupId) {
045                    return false;
046            }
047    
048            @Override
049            public boolean isRoleAllowed(long userId, long groupId, long roleId) {
050                    return true;
051            }
052    
053            @Override
054            public boolean isRoleRequired(long userId, long groupId, long roleId) {
055                    return false;
056            }
057    
058            public void propagateMembership(
059                    long[] userIds, long[] addOrganizationIds,
060                    long[] removeOrganizationIds) {
061            }
062    
063            @Override
064            public void verifyPolicy(Organization organization) {
065            }
066    
067            public void verifyPolicy(
068                    Organization organization, Organization oldOrganization,
069                    List<AssetCategory> oldAssetCategories, List<AssetTag> oldAssetTags,
070                    Map<String, Serializable> oldExpandoAttributes) {
071            }
072    
073    }