Examples of TenantSecurityException


Examples of grails.plugin.multitenant.core.exception.TenantSecurityException

        if (isMultiTenantEntity(event.getEntity())) {
            Integer currentTenantId = currentTenant.get();
            MultiTenantDomainClass entity = (MultiTenantDomainClass) event.getEntity();
            Integer entityTenantId = entity.getTenantId();
            if (currentTenantId != null && !currentTenantId.equals(entityTenantId)) {
                throw new TenantSecurityException("Tried to update '" + event.getEntity() + "' with another tenant id. Expected "
                        + currentTenantId + ", found " + entityTenantId, currentTenantId, entityTenantId);
            }
        }

        return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.