com.liferay.portal.security.permission.BasePermissionChecker Maven / Gradle / Ivy
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.security.permission;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.model.Group;
import com.liferay.portal.kernel.model.Role;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.model.role.RoleConstants;
import com.liferay.portal.kernel.security.permission.PermissionChecker;
import com.liferay.portal.kernel.service.GroupLocalServiceUtil;
import com.liferay.portal.kernel.service.RoleLocalServiceUtil;
import com.liferay.portal.kernel.service.UserLocalServiceUtil;
import com.liferay.portal.util.PropsValues;
import com.liferay.portlet.admin.util.OmniadminUtil;
import java.util.HashMap;
import java.util.Map;
/**
* @author Brian Wing Shun Chan
*/
public abstract class BasePermissionChecker implements PermissionChecker {
@Override
public abstract PermissionChecker clone();
@Override
public long getCompanyId() {
return user.getCompanyId();
}
@Override
public long[] getGuestUserRoleIds() {
return PermissionChecker.DEFAULT_ROLE_IDS;
}
@Override
public long getOwnerRoleId() {
return ownerRole.getRoleId();
}
@Override
public Map © 2015 - 2025 Weber Informatics LLC | Privacy Policy