use of org.camunda.bpm.engine.impl.persistence.entity.MembershipEntity in project camunda-bpm-platform by camunda.
the class DbIdentityServiceProvider method createMembership.
// membership //////////////////////////////////////////////////////
public void createMembership(String userId, String groupId) {
checkAuthorization(Permissions.CREATE, Resources.GROUP_MEMBERSHIP, groupId);
UserEntity user = findUserById(userId);
GroupEntity group = findGroupById(groupId);
MembershipEntity membership = new MembershipEntity();
membership.setUser(user);
membership.setGroup(group);
getDbEntityManager().insert(membership);
createDefaultMembershipAuthorizations(userId, groupId);
}
Aggregations