add add flag for active password

This commit is contained in:
2026-05-20 12:45:24 +07:00
parent db2a345efd
commit ed52fe3c51
3 changed files with 10 additions and 3 deletions
@@ -108,11 +108,15 @@ public class AdminUserHandler implements RequestHandler {
private BaseResponse handleCreate(BaseRequest request, AdminUserRequest adminRequest) {
try {
boolean superAdmin = adminRequest.getIsSuperAdmin() != null && adminRequest.getIsSuperAdmin();
boolean changePassword = adminRequest.getChangePassword() != null ? adminRequest.getChangePassword():
!superAdmin;
AdminUser admin = adminUserService.create(
adminRequest.getFullName(),
adminRequest.getEmail(),
adminRequest.getPassword(),
superAdmin);
changePassword, superAdmin);
Map<String, Integer> permissions = adminRequest.getPermissions();
Map<AdminSection, Integer> sectionPermissons = new HashMap<>();