Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
037445c
[NAE-2286] Group API
renczesstefan Feb 9, 2026
91d2ff4
[NAE-2286] Group API
renczesstefan Feb 10, 2026
7fe3e10
[NAE-2286] Group API
renczesstefan Feb 10, 2026
398601a
[NAE-2286] Group API
renczesstefan Feb 12, 2026
e04c49c
[NAE-2286] Group API
renczesstefan Feb 12, 2026
6910230
[NAE-2286] Group API
renczesstefan Feb 12, 2026
4a66d8c
[NAE-2286] Group API
renczesstefan Feb 12, 2026
5482d69
Rename and update AuthorizationService to AuthorizationServiceImpl
renczesstefan Feb 13, 2026
d0321a7
[NAE-2286] Group API
renczesstefan Feb 17, 2026
0505354
[NAE-2286] Group API
renczesstefan Feb 17, 2026
0d1288c
[NAE-2286] Group API
renczesstefan Feb 18, 2026
903385b
[NAE-2286] Group API
renczesstefan Feb 18, 2026
65e1786
Merge branch 'release/7.0.0-rev10' into NAE-2286
renczesstefan Feb 20, 2026
49ff2c1
[NAE-2286] Group API
renczesstefan Feb 20, 2026
6a8651b
[NAE-2286] Group API
renczesstefan Mar 5, 2026
e329da7
Add username to user creation across tests and system user logic
renczesstefan Mar 5, 2026
2d946d9
Refactor system user and group initialization logic
renczesstefan Mar 6, 2026
68f3e4b
Add null checks and refactor authority management in GroupService
renczesstefan Mar 11, 2026
4c39084
[NAE-2286] Group API
renczesstefan Mar 11, 2026
f342588
Enhance user creation with group details support
renczesstefan Mar 11, 2026
accafcd
Refactor method parameter order for group and user operations
renczesstefan Mar 11, 2026
a18a967
Add overload for removeAuthority method in GroupService
renczesstefan Mar 12, 2026
23db6a2
Add method to assign authority to a group
renczesstefan Mar 12, 2026
49bf891
Refactor excessive newlines in GroupService.java
renczesstefan Mar 12, 2026
9e61fb1
Fix null handling for Group member and subgroup IDs
renczesstefan Mar 13, 2026
0cc3200
Add support for removing process roles from groups
renczesstefan Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions application-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>

<!-- Spring Validator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<!-- Drools -->
<!-- <dependency>-->
<!-- <groupId>org.kie</groupId>-->
Expand Down Expand Up @@ -503,11 +509,6 @@
</dependency>

<!-- For Configuration Properties -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.2.3.Final</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import com.netgrif.application.engine.menu.services.interfaces.DashboardManageme
import com.netgrif.application.engine.menu.services.interfaces.IMenuItemService
import com.netgrif.application.engine.objects.auth.domain.Group
import com.netgrif.application.engine.objects.auth.domain.LoggedUser
import com.netgrif.application.engine.objects.auth.domain.QGroup
import com.netgrif.application.engine.objects.petrinet.domain.I18nString
import com.netgrif.application.engine.objects.petrinet.domain.PetriNet
import com.netgrif.application.engine.objects.petrinet.domain.Transition
Expand Down Expand Up @@ -99,6 +100,7 @@ import org.springframework.data.domain.Page
import org.springframework.data.domain.PageRequest
import org.springframework.data.domain.Pageable
import com.netgrif.application.engine.objects.utils.Nullable
import org.springframework.data.util.Pair

import java.time.ZoneId
import java.util.stream.Collectors
Expand Down Expand Up @@ -2874,4 +2876,61 @@ class ActionDelegate {
IStorageService storageService = storageResolverService.resolve(storageField.storageType)
return storageService.getPath(aCase.stringId, fileFieldId, fileName)
}

Group findGroupByIdentifier(String identifier) {
return groupService.findByIdentifier(identifier).orElse(null)
}

Group findGroupById(String groupId) {
return groupService.findById(groupId)
}

Page<Group> findGroups(Closure<Predicate> predicate = {it.identifier.isNotNull()}, Pageable pageable = Pageable.unpaged()) {
QGroup qGroup = new QGroup("group")
return groupService.findByPredicate(predicate(qGroup), pageable)
}

Group createGroup(String identifier, String title = "", AbstractUser owner = userService.getLoggedOrSystem()) {
return groupService.create(identifier, title, owner)
}

void deleteGroup(Group group) {
groupService.delete(group)
}

Group saveGroup(Group group) {
return groupService.save(group)
}

Group addUserToGroup(String groupId, String userId, String realmId) {
return groupService.addUser(groupId, userId, realmId)
}

Group removeUserFromGroup(String groupId, String userId, String realmId) {
return groupService.removeUser(groupId, userId, realmId)
}

Group addAuthorityToGroup(String groupId, String authorityId) {
return groupService.addAuthority(groupId, authorityId)
}

Group removeAuthorityFromGroup(String groupId, String authorityId) {
return groupService.removeAuthority(groupId, authorityId)
}

Group addRoleToGroup(String groupId, String roleId) {
return groupService.addRole(groupId, roleId)
}

Group removeRoleFromGroup(String groupId, String roleId) {
return groupService.removeRole(groupId, roleId)
}

Pair<Group, Group> addSubGroup(String groupId, String subGroupId) {
return groupService.addSubgroup(groupId, subGroupId)
}

Pair<Group, Group> removeSubGroup(String groupId, String subGroupId) {
return groupService.removeSubgroup(groupId, subGroupId)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public AbstractUser createNewUser(NewUserRequest newUser) {

if (newUser.groups != null && !newUser.groups.isEmpty()) {
for (String group : newUser.groups) {
groupService.addUser(user, group);
groupService.addUser(group, user);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.netgrif.application.engine.auth.service;

import com.netgrif.application.engine.auth.web.responsebodies.UserDto;
import com.netgrif.application.engine.objects.auth.domain.AbstractUser;
import com.netgrif.application.engine.objects.auth.domain.LoggedUser;
import com.netgrif.application.engine.auth.service.interfaces.IUserResourceHelperService;
import com.netgrif.application.engine.auth.web.responsebodies.User;
import com.netgrif.application.engine.auth.web.responsebodies.UserResource;
import com.netgrif.application.engine.impersonation.service.interfaces.IImpersonationService;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -32,20 +32,20 @@ public UserResource getResource(LoggedUser loggedUser, Locale locale, boolean sm
// User result = loggedUser.isImpersonating() ?
// getLocalisedUser(user, getImpersonated(loggedUser, small), locale) :
// getLocalisedUser(user, locale);
User result = getLocalisedUser(user, locale);
UserDto result = getLocalisedUser(user, locale);
return new UserResource(result, "profile");
}

@Override
public User getLocalisedUser(AbstractUser user, AbstractUser impersonated, Locale locale) {
User localisedUser = getLocalisedUser(user, locale);
User impersonatedUser = userFactory.getUser(impersonated, locale);
public UserDto getLocalisedUser(AbstractUser user, AbstractUser impersonated, Locale locale) {
UserDto localisedUser = getLocalisedUser(user, locale);
UserDto impersonatedUser = userFactory.getUser(impersonated, locale);
localisedUser.setImpersonated(impersonatedUser);
return localisedUser;
}

@Override
public User getLocalisedUser(AbstractUser user, Locale locale) {
public UserDto getLocalisedUser(AbstractUser user, Locale locale) {
return userFactory.getUser(user, locale);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.netgrif.application.engine.auth.service.interfaces;

import com.netgrif.application.engine.auth.web.responsebodies.User;
import com.netgrif.application.engine.auth.web.responsebodies.UserDto;
import com.netgrif.application.engine.auth.web.responsebodies.UserResource;
import com.netgrif.application.engine.objects.auth.domain.AbstractUser;
import com.netgrif.application.engine.objects.auth.domain.LoggedUser;
Expand All @@ -10,7 +10,7 @@
public interface IUserResourceHelperService {
UserResource getResource(LoggedUser loggedUser, Locale locale, boolean small);

User getLocalisedUser(AbstractUser user, AbstractUser impersonated, Locale locale);
UserDto getLocalisedUser(AbstractUser user, AbstractUser impersonated, Locale locale);

User getLocalisedUser(AbstractUser user, Locale locale);
UserDto getLocalisedUser(AbstractUser user, Locale locale);
}
Loading
Loading