use of org.camunda.bpm.engine.impl.persistence.entity.TenantMembershipEntity in project camunda-bpm-platform by camunda.
the class DbIdentityServiceProvider method createTenantGroupMembership.
public void createTenantGroupMembership(String tenantId, String groupId) {
checkAuthorization(Permissions.CREATE, Resources.TENANT_MEMBERSHIP, tenantId);
TenantEntity tenant = findTenantById(tenantId);
GroupEntity group = findGroupById(groupId);
ensureNotNull("No tenant found with id '" + tenantId + "'.", "tenant", tenant);
ensureNotNull("No group found with id '" + groupId + "'.", "group", group);
TenantMembershipEntity membership = new TenantMembershipEntity();
membership.setTenant(tenant);
membership.setGroup(group);
getDbEntityManager().insert(membership);
createDefaultTenantMembershipAuthorizations(tenant, group);
}
use of org.camunda.bpm.engine.impl.persistence.entity.TenantMembershipEntity in project camunda-bpm-platform by camunda.
the class DbIdentityServiceProvider method createTenantUserMembership.
public void createTenantUserMembership(String tenantId, String userId) {
checkAuthorization(Permissions.CREATE, Resources.TENANT_MEMBERSHIP, tenantId);
TenantEntity tenant = findTenantById(tenantId);
UserEntity user = findUserById(userId);
ensureNotNull("No tenant found with id '" + tenantId + "'.", "tenant", tenant);
ensureNotNull("No user found with id '" + userId + "'.", "user", user);
TenantMembershipEntity membership = new TenantMembershipEntity();
membership.setTenant(tenant);
membership.setUser(user);
getDbEntityManager().insert(membership);
createDefaultTenantMembershipAuthorizations(tenant, user);
}
Aggregations