From ffec5f7b549209ee2fae749db9b0ba4ec1274fc4 Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Sat, 18 May 2024 23:47:05 +0200 Subject: [PATCH] extends the functionality of oauth in Stirling PDF 2. --- .../SPDF/config/CleanUrlInterceptor.java | 9 +- .../CustomAuthenticationFailureHandler.java | 34 +- .../CustomAuthenticationSuccessHandler.java | 19 +- .../security/CustomLogoutSuccessHandler.java | 2 + .../security/CustomUserDetailsService.java | 10 +- .../config/security/InitialSecuritySetup.java | 82 +-- .../config/security/LoginAttemptService.java | 65 ++- .../security/SecurityConfiguration.java | 16 +- .../SPDF/config/security/UserService.java | 66 ++- ...tomOAuth2AuthenticationFailureHandler.java | 25 +- ...tomOAuth2AuthenticationSuccessHandler.java | 39 +- .../CustomOAuth2LogoutSuccessHandler.java | 63 ++- .../oauth2/CustomOAuth2UserService.java | 47 +- .../controller/web/AccountWebController.java | 142 +++++- .../software/SPDF/model/AttemptCounter.java | 13 +- .../stirling/software/SPDF/model/User.java | 2 +- src/main/resources/messages_ar_AR.properties | 8 +- src/main/resources/messages_bg_BG.properties | 9 +- src/main/resources/messages_ca_CA.properties | 9 +- src/main/resources/messages_de_DE.properties | 9 +- src/main/resources/messages_el_GR.properties | 9 +- src/main/resources/messages_en_GB.properties | 7 +- src/main/resources/messages_en_US.properties | 8 +- src/main/resources/messages_es_ES.properties | 12 +- src/main/resources/messages_eu_ES.properties | 9 +- src/main/resources/messages_fr_FR.properties | 10 +- src/main/resources/messages_hi_IN.properties | 9 +- src/main/resources/messages_hu_HU.properties | 9 +- src/main/resources/messages_id_ID.properties | 9 +- src/main/resources/messages_it_IT.properties | 9 +- src/main/resources/messages_ja_JP.properties | 9 +- src/main/resources/messages_ko_KR.properties | 12 +- src/main/resources/messages_nl_NL.properties | 9 +- src/main/resources/messages_pl_PL.properties | 9 +- src/main/resources/messages_pt_BR.properties | 9 +- src/main/resources/messages_pt_PT.properties | 9 +- src/main/resources/messages_ro_RO.properties | 9 +- src/main/resources/messages_ru_RU.properties | 12 +- src/main/resources/messages_sk_SK.properties | 23 +- .../resources/messages_sr_LATN_RS.properties | 9 +- src/main/resources/messages_sv_SE.properties | 9 +- src/main/resources/messages_tr_TR.properties | 11 +- src/main/resources/messages_uk_UA.properties | 9 +- src/main/resources/messages_zh_CN.properties | 9 +- src/main/resources/messages_zh_TW.properties | 11 +- src/main/resources/settings.yml.template | 7 +- .../js/thirdParty/jquery.validate.min.js | 4 + src/main/resources/templates/account.html | 477 +++++++++--------- src/main/resources/templates/addUsers.html | 70 ++- .../resources/templates/change-creds.html | 15 +- .../resources/templates/fragments/common.html | 294 ++++++----- src/main/resources/templates/login.html | 55 +- 52 files changed, 1055 insertions(+), 786 deletions(-) create mode 100644 src/main/resources/static/js/thirdParty/jquery.validate.min.js diff --git a/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java b/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java index 18393581..3c8efd3c 100644 --- a/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java +++ b/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java @@ -15,7 +15,14 @@ public class CleanUrlInterceptor implements HandlerInterceptor { private static final List ALLOWED_PARAMS = Arrays.asList( - "lang", "endpoint", "endpoints", "logout", "error", "file", "messageType"); + "lang", + "endpoint", + "endpoints", + "logout", + "error", + "erroroauth", + "file", + "messageType"); @Override public boolean preHandle( diff --git a/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationFailureHandler.java b/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationFailureHandler.java index 28a828c4..85447376 100644 --- a/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationFailureHandler.java +++ b/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationFailureHandler.java @@ -6,18 +6,17 @@ import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.InternalAuthenticationServiceException; import org.springframework.security.authentication.LockedException; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; -import org.springframework.stereotype.Component; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import stirling.software.SPDF.model.User; -@Component public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { private LoginAttemptService loginAttemptService; @@ -28,7 +27,7 @@ public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationF LoggerFactory.getLogger(CustomAuthenticationFailureHandler.class); public CustomAuthenticationFailureHandler( - LoginAttemptService loginAttemptService, UserService userService) { + final LoginAttemptService loginAttemptService, UserService userService) { this.loginAttemptService = loginAttemptService; this.userService = userService; } @@ -41,24 +40,29 @@ public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationF throws IOException, ServletException { String ip = request.getRemoteAddr(); - logger.error("Failed login attempt from IP: " + ip); + logger.error("Failed login attempt from IP: {}", ip); + + if (exception.getClass().isAssignableFrom(InternalAuthenticationServiceException.class) + || "Password must not be null".equalsIgnoreCase(exception.getMessage())) { + response.sendRedirect("/login?error=oauth2AuthenticationError"); + return; + } String username = request.getParameter("username"); - if (!isDemoUser(username)) { - if (loginAttemptService.loginAttemptCheck(username)) { + if (username != null && !isDemoUser(username)) { + logger.info( + "Remaining attempts for user {}: {}", + username, + loginAttemptService.getRemainingAttempts(username)); + loginAttemptService.loginFailed(username); + if (loginAttemptService.isBlocked(username) + || exception.getClass().isAssignableFrom(LockedException.class)) { response.sendRedirect("/login?error=locked"); return; - } else { - if (exception.getClass().isAssignableFrom(LockedException.class)) { - response.sendRedirect("/login?error=locked"); - return; - } else if (exception instanceof UsernameNotFoundException) { - response.sendRedirect("/login?error=oauth2AuthenticationError"); - return; - } } } - if (exception.getClass().isAssignableFrom(BadCredentialsException.class)) { + if (exception.getClass().isAssignableFrom(BadCredentialsException.class) + || exception.getClass().isAssignableFrom(UsernameNotFoundException.class)) { response.sendRedirect("/login?error=badcredentials"); return; } diff --git a/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationSuccessHandler.java b/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationSuccessHandler.java index 28b1b426..f10db07c 100644 --- a/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationSuccessHandler.java +++ b/src/main/java/stirling/software/SPDF/config/security/CustomAuthenticationSuccessHandler.java @@ -2,11 +2,9 @@ package stirling.software.SPDF.config.security; import java.io.IOException; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; import org.springframework.security.web.savedrequest.SavedRequest; -import org.springframework.stereotype.Component; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; @@ -14,23 +12,30 @@ import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpSession; import stirling.software.SPDF.utils.RequestUriUtils; -@Component public class CustomAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler { - @Autowired private LoginAttemptService loginAttemptService; + + private LoginAttemptService loginAttemptService; + + public CustomAuthenticationSuccessHandler(LoginAttemptService loginAttemptService) { + this.loginAttemptService = loginAttemptService; + } @Override public void onAuthenticationSuccess( HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { - String username = request.getParameter("username"); - loginAttemptService.loginSucceeded(username); + + String userName = request.getParameter("username"); + loginAttemptService.loginSucceeded(userName); + // Get the saved request HttpSession session = request.getSession(false); SavedRequest savedRequest = - session != null + (session != null) ? (SavedRequest) session.getAttribute("SPRING_SECURITY_SAVED_REQUEST") : null; + if (savedRequest != null && !RequestUriUtils.isStaticResource(savedRequest.getRedirectUrl())) { // Redirect to the original destination diff --git a/src/main/java/stirling/software/SPDF/config/security/CustomLogoutSuccessHandler.java b/src/main/java/stirling/software/SPDF/config/security/CustomLogoutSuccessHandler.java index fc929a1f..71a17f07 100644 --- a/src/main/java/stirling/software/SPDF/config/security/CustomLogoutSuccessHandler.java +++ b/src/main/java/stirling/software/SPDF/config/security/CustomLogoutSuccessHandler.java @@ -24,6 +24,8 @@ public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler { if (session != null) { String sessionId = session.getId(); sessionRegistry.removeSessionInformation(sessionId); + session.invalidate(); + logger.debug("Session invalidated: " + sessionId); } response.sendRedirect(request.getContextPath() + "/login?logout=true"); diff --git a/src/main/java/stirling/software/SPDF/config/security/CustomUserDetailsService.java b/src/main/java/stirling/software/SPDF/config/security/CustomUserDetailsService.java index 69c42e33..35718196 100644 --- a/src/main/java/stirling/software/SPDF/config/security/CustomUserDetailsService.java +++ b/src/main/java/stirling/software/SPDF/config/security/CustomUserDetailsService.java @@ -22,11 +22,7 @@ public class CustomUserDetailsService implements UserDetailsService { @Autowired private UserRepository userRepository; - private LoginAttemptService loginAttemptService; - - CustomUserDetailsService(LoginAttemptService loginAttemptService) { - this.loginAttemptService = loginAttemptService; - } + @Autowired private LoginAttemptService loginAttemptService; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { @@ -43,8 +39,8 @@ public class CustomUserDetailsService implements UserDetailsService { "Your account has been locked due to too many failed login attempts."); } - if (user.getPassword() == null || user.getPassword().isEmpty()) { - throw new UsernameNotFoundException("Password must not be null"); + if (!user.hasPassword()) { + throw new IllegalArgumentException("Password must not be null"); } return new org.springframework.security.core.userdetails.User( diff --git a/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java b/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java index 107b29d0..9ec02e17 100644 --- a/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java +++ b/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java @@ -21,47 +21,16 @@ public class InitialSecuritySetup { @Autowired private UserService userService; - @Autowired ApplicationProperties applicationProperties; + @Autowired private ApplicationProperties applicationProperties; private static final Logger logger = LoggerFactory.getLogger(InitialSecuritySetup.class); @PostConstruct public void init() { if (!userService.hasUsers()) { - - String initialUsername = - applicationProperties.getSecurity().getInitialLogin().getUsername(); - String initialPassword = - applicationProperties.getSecurity().getInitialLogin().getPassword(); - if (initialUsername != null && initialPassword != null) { - try { - // https://github.com/Stirling-Tools/Stirling-PDF/issues/976 - userService.isUsernameValidWithReturn(initialUsername); - } catch (IllegalArgumentException e) { - Path pathToFile = Paths.get("configs/settings.yml"); - - if (Files.exists(pathToFile)) { - logger.error( - "Invalid initial username provided , username can only contain letters, numbers and the following special characters @._+- or must be a valid email address."); - System.exit(1); - } - throw e; - } - userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId()); - } else { - initialUsername = "admin"; - initialPassword = "stirling"; - userService.saveUser( - initialUsername, initialPassword, Role.ADMIN.getRoleId(), true); - } - } - if (!userService.usernameExistsIgnoreCase(Role.INTERNAL_API_USER.getRoleId())) { - userService.saveUser( - Role.INTERNAL_API_USER.getRoleId(), - UUID.randomUUID().toString(), - Role.INTERNAL_API_USER.getRoleId()); - userService.addApiKeyToUser(Role.INTERNAL_API_USER.getRoleId()); + initializeAdminUser(); } + initializeInternalApiUser(); } @PostConstruct @@ -73,6 +42,51 @@ public class InitialSecuritySetup { } } + private void initializeAdminUser() { + String initialUsername = + applicationProperties.getSecurity().getInitialLogin().getUsername(); + String initialPassword = + applicationProperties.getSecurity().getInitialLogin().getPassword(); + + if (initialUsername != null + && !initialUsername.isEmpty() + && initialPassword != null + && !initialPassword.isEmpty() + && !userService.findByUsernameIgnoreCase(initialUsername).isPresent()) { + try { + if (userService.isUsernameValid(initialUsername)) { + userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId()); + logger.info("Admin user created: " + initialUsername); + } + } catch (IllegalArgumentException e) { + logger.error("Failed to initialize security setup", e); + System.exit(1); + } + } else { + createDefaultAdminUser(); + } + } + + private void createDefaultAdminUser() { + String defaultUsername = "admin"; + String defaultPassword = "stirling"; + if (!userService.findByUsernameIgnoreCase(defaultUsername).isPresent()) { + userService.saveUser(defaultUsername, defaultPassword, Role.ADMIN.getRoleId(), true); + logger.info("Default admin user created: " + defaultUsername); + } + } + + private void initializeInternalApiUser() { + if (!userService.usernameExistsIgnoreCase(Role.INTERNAL_API_USER.getRoleId())) { + userService.saveUser( + Role.INTERNAL_API_USER.getRoleId(), + UUID.randomUUID().toString(), + Role.INTERNAL_API_USER.getRoleId()); + userService.addApiKeyToUser(Role.INTERNAL_API_USER.getRoleId()); + logger.info("Internal API user created: " + Role.INTERNAL_API_USER.getRoleId()); + } + } + private void saveKeyToConfig(String key) throws IOException { Path path = Paths.get("configs", "settings.yml"); // Target the configs/settings.yml List lines = Files.readAllLines(path); diff --git a/src/main/java/stirling/software/SPDF/config/security/LoginAttemptService.java b/src/main/java/stirling/software/SPDF/config/security/LoginAttemptService.java index abe65f20..f398f13c 100644 --- a/src/main/java/stirling/software/SPDF/config/security/LoginAttemptService.java +++ b/src/main/java/stirling/software/SPDF/config/security/LoginAttemptService.java @@ -3,6 +3,8 @@ package stirling.software.SPDF.config.security; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -15,47 +17,62 @@ public class LoginAttemptService { @Autowired ApplicationProperties applicationProperties; - private int MAX_ATTEMPTS; + private static final Logger logger = LoggerFactory.getLogger(LoginAttemptService.class); + + private int MAX_ATTEMPT; private long ATTEMPT_INCREMENT_TIME; + private ConcurrentHashMap attemptsCache; @PostConstruct public void init() { - MAX_ATTEMPTS = applicationProperties.getSecurity().getLoginAttemptCount(); + MAX_ATTEMPT = applicationProperties.getSecurity().getLoginAttemptCount(); ATTEMPT_INCREMENT_TIME = TimeUnit.MINUTES.toMillis( applicationProperties.getSecurity().getLoginResetTimeMinutes()); + attemptsCache = new ConcurrentHashMap<>(); } - private final ConcurrentHashMap attemptsCache = - new ConcurrentHashMap<>(); - public void loginSucceeded(String key) { + logger.info(key + " " + attemptsCache.mappingCount()); + if (key == null || key.trim().isEmpty()) { + return; + } attemptsCache.remove(key.toLowerCase()); } - public boolean loginAttemptCheck(String key) { - return attemptsCache - .compute( - key.toLowerCase(), - (k, attemptCounter) -> { - if (attemptCounter == null - || attemptCounter.shouldReset(ATTEMPT_INCREMENT_TIME)) { - return new AttemptCounter(); - } else { - attemptCounter.increment(); - return attemptCounter; - } - }) - .getAttemptCount() - >= MAX_ATTEMPTS; + public void loginFailed(String key) { + if (key == null || key.trim().isEmpty()) return; + + AttemptCounter attemptCounter = attemptsCache.get(key.toLowerCase()); + if (attemptCounter == null) { + attemptCounter = new AttemptCounter(); + attemptsCache.put(key.toLowerCase(), attemptCounter); + } else { + if (attemptCounter.shouldReset(ATTEMPT_INCREMENT_TIME)) { + attemptCounter.reset(); + } + attemptCounter.increment(); + } } public boolean isBlocked(String key) { + if (key == null || key.trim().isEmpty()) return false; AttemptCounter attemptCounter = attemptsCache.get(key.toLowerCase()); - if (attemptCounter != null) { - return attemptCounter.getAttemptCount() >= MAX_ATTEMPTS - && !attemptCounter.shouldReset(ATTEMPT_INCREMENT_TIME); + if (attemptCounter == null) { + return false; } - return false; + + return attemptCounter.getAttemptCount() >= MAX_ATTEMPT; + } + + public int getRemainingAttempts(String key) { + if (key == null || key.trim().isEmpty()) return MAX_ATTEMPT; + + AttemptCounter attemptCounter = attemptsCache.get(key.toLowerCase()); + if (attemptCounter == null) { + return MAX_ATTEMPT; + } + + return MAX_ATTEMPT - attemptCounter.getAttemptCount(); } } diff --git a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java index 91be4f38..3b3cdaf3 100644 --- a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java +++ b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java @@ -94,7 +94,8 @@ public class SecurityConfiguration { formLogin .loginPage("/login") .successHandler( - new CustomAuthenticationSuccessHandler()) + new CustomAuthenticationSuccessHandler( + loginAttemptService)) .defaultSuccessUrl("/") .failureHandler( new CustomAuthenticationFailureHandler( @@ -146,7 +147,6 @@ public class SecurityConfiguration { .permitAll() .anyRequest() .authenticated()) - .userDetailsService(userDetailsService) .authenticationProvider(authenticationProvider()); // Handle OAUTH2 Logins @@ -162,7 +162,9 @@ public class SecurityConfiguration { */ .successHandler( new CustomOAuth2AuthenticationSuccessHandler( - applicationProperties, userService)) + loginAttemptService, + applicationProperties, + userService)) .failureHandler( new CustomOAuth2AuthenticationFailureHandler()) // Add existing Authorities from the database @@ -171,15 +173,17 @@ public class SecurityConfiguration { userInfoEndpoint .oidcUserService( new CustomOAuth2UserService( - applicationProperties)) + applicationProperties, + userService, + loginAttemptService)) .userAuthoritiesMapper( userAuthoritiesMapper()))) - .userDetailsService(userDetailsService) .logout( logout -> logout.logoutSuccessHandler( new CustomOAuth2LogoutSuccessHandler( - this.applicationProperties))); + this.applicationProperties, + sessionRegistry()))); } } else { http.csrf(csrf -> csrf.disable()) diff --git a/src/main/java/stirling/software/SPDF/config/security/UserService.java b/src/main/java/stirling/software/SPDF/config/security/UserService.java index 893230ed..1fcf63f8 100644 --- a/src/main/java/stirling/software/SPDF/config/security/UserService.java +++ b/src/main/java/stirling/software/SPDF/config/security/UserService.java @@ -40,11 +40,11 @@ public class UserService implements UserServiceInterface { // Handle OAUTH2 login and user auto creation. public boolean processOAuth2PostLogin(String username, boolean autoCreateUser) { - if (!isUsernameValidWithReturn(username).equals(username)) { + if (!isUsernameValid(username)) { return false; } - Optional existUser = userRepository.findByUsernameIgnoreCase(username); - if (existUser.isPresent()) { + Optional existingUser = userRepository.findByUsernameIgnoreCase(username); + if (existingUser.isPresent()) { return true; } if (autoCreateUser) { @@ -114,9 +114,8 @@ public class UserService implements UserServiceInterface { } public UserDetails loadUserByApiKey(String apiKey) { - User userOptional = userRepository.findByApiKey(apiKey); - if (userOptional != null) { - User user = userOptional; + User user = userRepository.findByApiKey(apiKey); + if (user != null) { // Convert your User entity to a UserDetails object with authorities return new org.springframework.security.core.userdetails.User( user.getUsername(), @@ -128,13 +127,16 @@ public class UserService implements UserServiceInterface { public boolean validateApiKeyForUser(String username, String apiKey) { Optional userOpt = userRepository.findByUsernameIgnoreCase(username); - return userOpt.isPresent() && userOpt.get().getApiKey().equals(apiKey); + return userOpt.isPresent() && apiKey.equals(userOpt.get().getApiKey()); } public void saveUser(String username, AuthenticationType authenticationType) throws IllegalArgumentException { + if (!isUsernameValid(username)) { + throw new IllegalArgumentException(getInvalidUsernameMessage()); + } User user = new User(); - user.setUsername(isUsernameValidWithReturn(username)); + user.setUsername(username); user.setEnabled(true); user.setFirstLogin(false); user.addAuthority(new Authority(Role.USER.getRoleId(), user)); @@ -143,8 +145,11 @@ public class UserService implements UserServiceInterface { } public void saveUser(String username, String password) throws IllegalArgumentException { + if (!isUsernameValid(username)) { + throw new IllegalArgumentException(getInvalidUsernameMessage()); + } User user = new User(); - user.setUsername(isUsernameValidWithReturn(username)); + user.setUsername(username); user.setPassword(passwordEncoder.encode(password)); user.setEnabled(true); user.setAuthenticationType(AuthenticationType.WEB); @@ -153,8 +158,11 @@ public class UserService implements UserServiceInterface { public void saveUser(String username, String password, String role, boolean firstLogin) throws IllegalArgumentException { + if (!isUsernameValid(username)) { + throw new IllegalArgumentException(getInvalidUsernameMessage()); + } User user = new User(); - user.setUsername(isUsernameValidWithReturn(username)); + user.setUsername(username); user.setPassword(passwordEncoder.encode(password)); user.addAuthority(new Authority(role, user)); user.setEnabled(true); @@ -165,14 +173,7 @@ public class UserService implements UserServiceInterface { public void saveUser(String username, String password, String role) throws IllegalArgumentException { - User user = new User(); - user.setUsername(isUsernameValidWithReturn(username)); - user.setPassword(passwordEncoder.encode(password)); - user.addAuthority(new Authority(role, user)); - user.setEnabled(true); - user.setAuthenticationType(AuthenticationType.WEB); - user.setFirstLogin(false); - userRepository.save(user); + saveUser(username, password, role, false); } public void deleteUser(String username) { @@ -206,7 +207,7 @@ public class UserService implements UserServiceInterface { Map settingsMap = user.getSettings(); if (settingsMap == null) { - settingsMap = new HashMap(); + settingsMap = new HashMap<>(); } settingsMap.clear(); settingsMap.putAll(updates); @@ -229,7 +230,10 @@ public class UserService implements UserServiceInterface { } public void changeUsername(User user, String newUsername) throws IllegalArgumentException { - user.setUsername(isUsernameValidWithReturn(newUsername)); + if (!isUsernameValid(newUsername)) { + throw new IllegalArgumentException(getInvalidUsernameMessage()); + } + user.setUsername(newUsername); userRepository.save(user); } @@ -264,30 +268,20 @@ public class UserService implements UserServiceInterface { return isValidSimpleUsername || isValidEmail; } - public String isUsernameValidWithReturn(String username) throws IllegalArgumentException { - if (!isUsernameValid(username)) { - String message = - messageSource.getMessage( - "invalidUsernameMessage", null, LocaleContextHolder.getLocale()); - throw new IllegalArgumentException(message); - } - return username; + private String getInvalidUsernameMessage() { + return messageSource.getMessage( + "invalidUsernameMessage", null, LocaleContextHolder.getLocale()); } public boolean hasPassword(String username) { Optional user = userRepository.findByUsernameIgnoreCase(username); - if (user.isPresent() && user.get().hasPassword()) { - return true; - } - return false; + return user.isPresent() && user.get().hasPassword(); } public boolean isAuthenticationTypeByUsername( String username, AuthenticationType authenticationType) { Optional user = userRepository.findByUsernameIgnoreCase(username); - if (user.isPresent() && user.get().getAuthenticationType() != null) { - return user.get().getAuthenticationType().equalsIgnoreCase(authenticationType.name()); - } - return false; + return user.isPresent() + && authenticationType.name().equalsIgnoreCase(user.get().getAuthenticationType()); } } diff --git a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationFailureHandler.java b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationFailureHandler.java index 89f8c441..6b6a72c1 100644 --- a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationFailureHandler.java +++ b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationFailureHandler.java @@ -2,22 +2,24 @@ package stirling.software.SPDF.config.security.oauth2; import java.io.IOException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.security.authentication.LockedException; import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.oauth2.core.OAuth2AuthenticationException; import org.springframework.security.oauth2.core.OAuth2Error; import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; -import org.springframework.stereotype.Component; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -@Component public class CustomOAuth2AuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { + private static final Logger logger = + LoggerFactory.getLogger(CustomOAuth2AuthenticationFailureHandler.class); + @Override public void onAuthenticationFailure( HttpServletRequest request, @@ -26,14 +28,21 @@ public class CustomOAuth2AuthenticationFailureHandler throws IOException, ServletException { if (exception instanceof OAuth2AuthenticationException) { OAuth2Error error = ((OAuth2AuthenticationException) exception).getError(); + + String errorCode = error.getErrorCode(); + + if (error.getErrorCode().equals("Password must not be null")) { + errorCode = "userAlreadyExistsWeb"; + } + logger.error("OAuth2 Authentication error: " + errorCode); getRedirectStrategy() - .sendRedirect(request, response, "/login?error=oAuth::" + error.getErrorCode()); + .sendRedirect(request, response, "/logout?erroroauth=" + errorCode); + return; } else if (exception instanceof LockedException) { - getRedirectStrategy().sendRedirect(request, response, "/login?error=locked"); - } else if (exception instanceof UsernameNotFoundException) { - getRedirectStrategy() - .sendRedirect(request, response, "/login?error=oauth2AuthenticationError"); + logger.error("Account locked: ", exception); + getRedirectStrategy().sendRedirect(request, response, "/logout?error=locked"); } else { + logger.error("Unhandled authentication exception", exception); super.onAuthenticationFailure(request, response, exception); } } diff --git a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationSuccessHandler.java b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationSuccessHandler.java index b300ef58..8468de5d 100644 --- a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationSuccessHandler.java +++ b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2AuthenticationSuccessHandler.java @@ -2,33 +2,43 @@ package stirling.software.SPDF.config.security.oauth2; import java.io.IOException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.authentication.LockedException; import org.springframework.security.core.Authentication; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; import org.springframework.security.web.savedrequest.SavedRequest; -import org.springframework.stereotype.Component; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpSession; +import stirling.software.SPDF.config.security.LoginAttemptService; import stirling.software.SPDF.config.security.UserService; import stirling.software.SPDF.model.ApplicationProperties; import stirling.software.SPDF.model.ApplicationProperties.Security.OAUTH2; import stirling.software.SPDF.model.AuthenticationType; import stirling.software.SPDF.utils.RequestUriUtils; -@Component public class CustomOAuth2AuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler { - ApplicationProperties applicationProperties; - UserService userService; + private LoginAttemptService loginAttemptService; + + private static final Logger logger = + LoggerFactory.getLogger(CustomOAuth2AuthenticationSuccessHandler.class); + + private ApplicationProperties applicationProperties; + private UserService userService; public CustomOAuth2AuthenticationSuccessHandler( - ApplicationProperties applicationProperties, UserService userService) { + final LoginAttemptService loginAttemptService, + ApplicationProperties applicationProperties, + UserService userService) { this.applicationProperties = applicationProperties; this.userService = userService; + this.loginAttemptService = loginAttemptService; } @Override @@ -36,28 +46,37 @@ public class CustomOAuth2AuthenticationSuccessHandler HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { - OAuth2User oauthUser = (OAuth2User) authentication.getPrincipal(); - // Get the saved request HttpSession session = request.getSession(false); SavedRequest savedRequest = - session != null + (session != null) ? (SavedRequest) session.getAttribute("SPRING_SECURITY_SAVED_REQUEST") : null; + if (savedRequest != null && !RequestUriUtils.isStaticResource(savedRequest.getRedirectUrl())) { // Redirect to the original destination super.onAuthenticationSuccess(request, response, authentication); } else { + OAuth2User oauthUser = (OAuth2User) authentication.getPrincipal(); OAUTH2 oAuth = applicationProperties.getSecurity().getOAUTH2(); - String username = oauthUser.getAttribute(oAuth.getUseAsUsername()); + + String username = oauthUser.getName(); + + if (loginAttemptService.isBlocked(username)) { + if (session != null) { + session.removeAttribute("SPRING_SECURITY_SAVED_REQUEST"); + } + throw new LockedException( + "Your account has been locked due to too many failed login attempts."); + } if (userService.usernameExistsIgnoreCase(username) && userService.hasPassword(username) && !userService.isAuthenticationTypeByUsername( username, AuthenticationType.OAUTH2) && oAuth.getAutoCreateUser()) { response.sendRedirect( - request.getContextPath() + "/logout?oauth2AuthenticationError=true"); + request.getContextPath() + "/logout?oauth2AuthenticationErrorWeb=true"); return; } else { try { diff --git a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2LogoutSuccessHandler.java b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2LogoutSuccessHandler.java index 3372bd11..ea1b05b2 100644 --- a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2LogoutSuccessHandler.java +++ b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2LogoutSuccessHandler.java @@ -2,13 +2,11 @@ package stirling.software.SPDF.config.security.oauth2; import java.io.IOException; -import org.springframework.beans.factory.annotation.Autowired; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.security.core.Authentication; import org.springframework.security.core.session.SessionRegistry; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler; -import org.springframework.stereotype.Component; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; @@ -17,14 +15,17 @@ import jakarta.servlet.http.HttpSession; import stirling.software.SPDF.model.ApplicationProperties; import stirling.software.SPDF.model.ApplicationProperties.Security.OAUTH2; -@Component public class CustomOAuth2LogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler { - @Autowired SessionRegistry sessionRegistry; + private static final Logger logger = + LoggerFactory.getLogger(CustomOAuth2LogoutSuccessHandler.class); - private ApplicationProperties applicationProperties; + private final SessionRegistry sessionRegistry; + private final ApplicationProperties applicationProperties; - public CustomOAuth2LogoutSuccessHandler(ApplicationProperties applicationProperties) { + public CustomOAuth2LogoutSuccessHandler( + ApplicationProperties applicationProperties, SessionRegistry sessionRegistry) { + this.sessionRegistry = sessionRegistry; this.applicationProperties = applicationProperties; } @@ -33,32 +34,27 @@ public class CustomOAuth2LogoutSuccessHandler extends SimpleUrlLogoutSuccessHand HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { - boolean isOAuthUser = true; String param = "logout=true"; - if (authentication == null) { - response.sendRedirect("/"); - return; - } - Object pri = authentication.getPrincipal(); - if (pri instanceof UserDetails) { - UserDetails userDetails = (UserDetails) pri; - isOAuthUser = userDetails.getPassword() == null; - } else if (pri instanceof OAuth2User) { - isOAuthUser = true; - } OAUTH2 oauth = applicationProperties.getSecurity().getOAUTH2(); - String provider = oauth.getProvider() != null && isOAuthUser ? oauth.getProvider() : ""; + String provider = oauth.getProvider() != null ? oauth.getProvider() : ""; - if (request.getParameter("oauth2AuthenticationError") != null) { - param = "error=oauth2AuthenticationError"; - } else if (request.getParameter("invalidUsername") != null) { - param = "error=invalidUsername"; + if (request.getParameter("oauth2AuthenticationErrorWeb") != null) { + param = "erroroauth=oauth2AuthenticationErrorWeb"; + } else if (request.getParameter("error") != null) { + param = "error=" + request.getParameter("error"); + } else if (request.getParameter("erroroauth") != null) { + param = "erroroauth=" + request.getParameter("erroroauth"); + } else if (request.getParameter("oauth2AutoCreateDisabled") != null) { + param = "error=oauth2AutoCreateDisabled"; } + HttpSession session = request.getSession(false); if (session != null) { String sessionId = session.getId(); sessionRegistry.removeSessionInformation(sessionId); + session.invalidate(); + logger.debug("Session invalidated: " + sessionId); } switch (provider) { @@ -70,17 +66,20 @@ public class CustomOAuth2LogoutSuccessHandler extends SimpleUrlLogoutSuccessHand + oauth.getClientId() + "&post_logout_redirect_uri=" + response.encodeRedirectURL( - "http://" + request.getHeader("host") + "/login?" + param); + request.getScheme() + + "://" + + request.getHeader("host") + + "/login?" + + param); + logger.debug("Redirecting to Keycloak logout URL: " + logoutUrl); response.sendRedirect(logoutUrl); break; case "google": + // Add Google specific logout URL if needed default: - if (request.getParameter("oauth2AutoCreateDisabled") != null) { - response.sendRedirect( - request.getContextPath() + "/login?error=oauth2AutoCreateDisabled"); - } else { - response.sendRedirect(request.getContextPath() + "/login?logout=true"); - } + String redirectUrl = request.getContextPath() + "/login?" + param; + logger.debug("Redirecting to default logout URL: " + redirectUrl); + response.sendRedirect(redirectUrl); break; } } diff --git a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2UserService.java b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2UserService.java index e719232f..a5d65ff0 100644 --- a/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2UserService.java +++ b/src/main/java/stirling/software/SPDF/config/security/oauth2/CustomOAuth2UserService.java @@ -1,8 +1,10 @@ package stirling.software.SPDF.config.security.oauth2; -import java.util.HashMap; -import java.util.Map; +import java.util.Optional; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.authentication.LockedException; import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest; import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService; import org.springframework.security.oauth2.client.userinfo.OAuth2UserService; @@ -11,16 +13,30 @@ import org.springframework.security.oauth2.core.OAuth2Error; import org.springframework.security.oauth2.core.oidc.user.DefaultOidcUser; import org.springframework.security.oauth2.core.oidc.user.OidcUser; +import stirling.software.SPDF.config.security.LoginAttemptService; +import stirling.software.SPDF.config.security.UserService; import stirling.software.SPDF.model.ApplicationProperties; +import stirling.software.SPDF.model.User; public class CustomOAuth2UserService implements OAuth2UserService { private final OidcUserService delegate = new OidcUserService(); + private UserService userService; + + private LoginAttemptService loginAttemptService; + private ApplicationProperties applicationProperties; - public CustomOAuth2UserService(ApplicationProperties applicationProperties) { + private static final Logger logger = LoggerFactory.getLogger(CustomOAuth2UserService.class); + + public CustomOAuth2UserService( + ApplicationProperties applicationProperties, + UserService userService, + LoginAttemptService loginAttemptService) { this.applicationProperties = applicationProperties; + this.userService = userService; + this.loginAttemptService = loginAttemptService; } @Override @@ -28,16 +44,18 @@ public class CustomOAuth2UserService implements OAuth2UserService attributes = new HashMap<>(user.getAttributes()); - - // Ensure the preferred username attribute is present - if (!attributes.containsKey(usernameAttribute)) { - attributes.put(usernameAttribute, attributes.getOrDefault("email", "")); - usernameAttribute = "email"; + String username = user.getUserInfo().getClaimAsString(usernameAttribute); + Optional duser = userService.findByUsernameIgnoreCase(username); + if (duser.isPresent()) { + if (loginAttemptService.isBlocked(username)) { + throw new LockedException( + "Your account has been locked due to too many failed login attempts."); + } + if (userService.hasPassword(username)) { + throw new IllegalArgumentException("Password must not be null"); + } } - // Return a new OidcUser with adjusted attributes return new DefaultOidcUser( user.getAuthorities(), @@ -45,8 +63,11 @@ public class CustomOAuth2UserService implements OAuth2UserService allUsers = userRepository.findAll(); Iterator iterator = allUsers.iterator(); Map roleDetails = Role.getAllRoleDetails(); @@ -78,6 +122,52 @@ public class AccountWebController { } } + String messageType = request.getParameter("messageType"); + + String deleteMessage = null; + if (messageType != null) { + switch (messageType) { + case "deleteCurrentUser": + deleteMessage = "deleteCurrentUserMessage"; + break; + case "deleteUsernameExists": + deleteMessage = "deleteUsernameExistsMessage"; + break; + default: + break; + } + model.addAttribute("deleteMessage", deleteMessage); + + String addMessage = null; + switch (messageType) { + case "usernameExists": + addMessage = "usernameExistsMessage"; + break; + case "invalidUsername": + addMessage = "invalidUsernameMessage"; + break; + default: + break; + } + model.addAttribute("addMessage", addMessage); + } + + String changeMessage = null; + if (messageType != null) { + switch (messageType) { + case "userNotFound": + changeMessage = "userNotFoundMessage"; + break; + case "downgradeCurrentUser": + changeMessage = "downgradeCurrentUserMessage"; + break; + + default: + break; + } + model.addAttribute("changeMessage", changeMessage); + } + model.addAttribute("users", allUsers); model.addAttribute("currentUsername", authentication.getName()); model.addAttribute("roleDetails", roleDetails); @@ -136,6 +226,30 @@ public class AccountWebController { return "redirect:/error"; // Example redirection in case of error } + String messageType = request.getParameter("messageType"); + if (messageType != null) { + switch (messageType) { + case "notAuthenticated": + messageType = "notAuthenticatedMessage"; + break; + case "userNotFound": + messageType = "userNotFoundMessage"; + break; + case "incorrectPassword": + messageType = "incorrectPasswordMessage"; + break; + case "usernameExists": + messageType = "usernameExistsMessage"; + break; + case "invalidUsername": + messageType = "invalidUsernameMessage"; + break; + default: + break; + } + model.addAttribute("messageType", messageType); + } + // Add attributes to the model model.addAttribute("username", username); model.addAttribute("role", user.get().getRolesAsString()); @@ -174,6 +288,28 @@ public class AccountWebController { // Handle error appropriately return "redirect:/error"; // Example redirection in case of error } + + String messageType = request.getParameter("messageType"); + if (messageType != null) { + switch (messageType) { + case "notAuthenticated": + messageType = "notAuthenticatedMessage"; + break; + case "userNotFound": + messageType = "userNotFoundMessage"; + break; + case "incorrectPassword": + messageType = "incorrectPasswordMessage"; + break; + case "usernameExists": + messageType = "usernameExistsMessage"; + break; + default: + break; + } + model.addAttribute("messageType", messageType); + } + // Add attributes to the model model.addAttribute("username", username); } diff --git a/src/main/java/stirling/software/SPDF/model/AttemptCounter.java b/src/main/java/stirling/software/SPDF/model/AttemptCounter.java index 7cb13ee0..8267bddb 100644 --- a/src/main/java/stirling/software/SPDF/model/AttemptCounter.java +++ b/src/main/java/stirling/software/SPDF/model/AttemptCounter.java @@ -5,7 +5,7 @@ public class AttemptCounter { private long lastAttemptTime; public AttemptCounter() { - this.attemptCount = 1; + this.attemptCount = 0; this.lastAttemptTime = System.currentTimeMillis(); } @@ -18,11 +18,16 @@ public class AttemptCounter { return attemptCount; } - public long getlastAttemptTime() { + public long getLastAttemptTime() { return lastAttemptTime; } - public boolean shouldReset(long ATTEMPT_INCREMENT_TIME) { - return System.currentTimeMillis() - lastAttemptTime > ATTEMPT_INCREMENT_TIME; + public boolean shouldReset(long attemptIncrementTime) { + return System.currentTimeMillis() - lastAttemptTime > attemptIncrementTime; + } + + public void reset() { + this.attemptCount = 0; + this.lastAttemptTime = System.currentTimeMillis(); } } diff --git a/src/main/java/stirling/software/SPDF/model/User.java b/src/main/java/stirling/software/SPDF/model/User.java index b3e577b7..74780dd8 100644 --- a/src/main/java/stirling/software/SPDF/model/User.java +++ b/src/main/java/stirling/software/SPDF/model/User.java @@ -150,6 +150,6 @@ public class User { } public boolean hasPassword() { - return this.getPassword() != "" ? true : false; + return this.password != null && !this.password.isEmpty(); } } diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 5e25b2b5..ec327fcd 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=لا يمكن خفض دور المستخدم الحالي downgradeCurrentUserLongMessage=لا يمكن تخفيض دور المستخدم الحالي. وبالتالي، لن يظهر المستخدم الحالي. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -73,6 +74,7 @@ sponsor=Sponsor info=Info + ############### # Pipeline # ############### @@ -183,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=تغيير دور المستخدم -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -1058,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index f734abb1..69c63c60 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Не може да се изтрие вписания deleteUsernameExistsMessage=Потребителското име не съществува и не може да бъде изтрито. downgradeCurrentUserMessage=Не може да се понижи ролята на текущия потребител downgradeCurrentUserLongMessage=Не може да се понижи ролята на текущия потребител. Следователно текущият потребител няма да бъде показан. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Грешка oops=Опаа! help=Помощ @@ -74,7 +75,6 @@ info=Info - ############### # Pipeline # ############### @@ -185,7 +185,7 @@ adminUserSettings.internalApiUser=Вътрешен API потребител adminUserSettings.forceChange=Принудете потребителя да промени потребителското име/парола при влизане adminUserSettings.submit=Съхранете потребителя adminUserSettings.changeUserRole=Промяна на ролята на потребителя -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -807,7 +807,6 @@ multiTool.title=PDF Мулти инструмент multiTool.header=PDF Мулти инструмент multiTool.uploadPrompts=File Name - #view pdf viewPdf.title=Преглед на PDF viewPdf.header=Преглед на PDF @@ -1061,7 +1060,7 @@ licenses.version=Версия licenses.license=Лиценз -# error +#error error.sorry=Извинете за проблема! error.needHelp=Нуждаете се от помощ / Открихте проблем? error.contactTip=Ако все още имате проблеми, не се колебайте да се свържете с нас за помощ. Можете да изпратите запитване на нашата страница в GitHub или да се свържете с нас чрез Discord: diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index 816b913c..938de9b4 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=No es pot reduir la funció de l'usuari actual downgradeCurrentUserLongMessage=No es pot baixar la funció de l'usuari actual. Per tant, no es mostrarà l'usuari actual. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Desar Usuari adminUserSettings.changeUserRole=Canvia el rol de l'usuari -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=PDF Multi Tool multiTool.header=PDF Multi Tool -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 0d10b2e1..26a643fd 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Der aktuell angemeldete Benutzer kann nicht gelöscht w deleteUsernameExistsMessage=Der Benutzername existiert nicht und kann nicht gelöscht werden. downgradeCurrentUserMessage=Die Rolle des aktuellen Benutzers kann nicht herabgestuft werden downgradeCurrentUserLongMessage=Die Rolle des aktuellen Benutzers kann nicht herabgestuft werden. Daher wird der aktuelle Benutzer nicht angezeigt. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Fehler oops=Hoppla! help=Hilfe @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Interner API-Benutzer adminUserSettings.forceChange=Benutzer dazu zwingen, Benutzernamen/Passwort bei der Anmeldung zu ändern adminUserSettings.submit=Benutzer speichern adminUserSettings.changeUserRole=Benutzerrolle ändern -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(z.B. 1,3,2 oder 4-8,2,10-12 oder 2n-1) #multiTool multiTool.title=PDF-Multitool multiTool.header=PDF-Multitool -multiTool.uploadPrompts=Bitte PDF hochladen +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=PDF anzeigen @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=Lizenz -# error +#error error.sorry=Entschuldigung für das Problem! error.needHelp=Brauchst du Hilfe / Ein Problem gefunden? error.contactTip=Wenn du weiterhin Probleme hast, zögere nicht, uns um Hilfe zu bitten. Du kannst ein Ticket auf unserer GitHub-Seite einreichen oder uns über Discord kontaktieren: diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 61ae960e..2c4b589d 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Δεν είναι δυνατή η διαγραφή το deleteUsernameExistsMessage=Το όνομα χρήστη δεν υπάρχει και δεν μπορεί να διαγραφεί. downgradeCurrentUserMessage=Δεν είναι δυνατή η υποβάθμιση του ρόλου του τρέχοντος χρήστη downgradeCurrentUserLongMessage=Δεν είναι δυνατή η υποβάθμιση του ρόλου του τρέχοντος χρήστη. Ως εκ τούτου, ο τρέχων χρήστης δεν θα εμφανίζεται. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Σφάλμα oops=Ωχ! help=Βοήθεια @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Εσωτερικός API χρήστης adminUserSettings.forceChange=Αναγκάστε τον χρήστη να αλλάξει το όνομα χρήστη/κωδικό πρόσβασης κατά τη σύνδεση adminUserSettings.submit=Αποθήκευση Χρήστη adminUserSettings.changeUserRole=Αλλαγή ρόλου χρήστη -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(π.χ. 1,3,2 ή 4-8,2,10-12 ή 2n-1) #multiTool multiTool.title=PDF Πολυεργαλείο multiTool.header=PDF Πολυεργαλείο -multiTool.uploadPrompts=Ανεβάστε το PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Προβολή PDF @@ -1059,7 +1060,7 @@ licenses.version=Εκδοχή licenses.license=Άδεια -# error +#error error.sorry=Συγγνώμη για το ζήτημα! error.needHelp=Χρειάζεστε βοήθεια / Βρήκατε πρόβλημα; error.contactTip=Εάν εξακολουθείτε να αντιμετωπίζετε προβλήματα, μη διστάσετε να επικοινωνήσετε μαζί μας για βοήθεια. Μπορείτε να υποβάλετε ένα ticket στη σελίδα μας στο GitHub ή να επικοινωνήσετε μαζί μας μέσω του Discord: diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 84d67733..4db7aa9c 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Cannot downgrade current user's role downgradeCurrentUserLongMessage=Cannot downgrade current user's role. Hence, current user will not be shown. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Change User's Role -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index f5b332a9..fc9ef598 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Cannot downgrade current user's role downgradeCurrentUserLongMessage=Cannot downgrade current user's role. Hence, current user will not be shown. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -73,6 +74,7 @@ sponsor=Sponsor info=Info + ############### # Pipeline # ############### @@ -183,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Change User's Role -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -1058,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index d7ff0ce2..c5277774 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=No puede eliminar el usuario que tiene la sesión actua deleteUsernameExistsMessage=El usuario no existe y no puede eliminarse. downgradeCurrentUserMessage=No se puede degradar el rol del usuario actual downgradeCurrentUserLongMessage=No se puede degradar el rol del usuario actual. Por lo tanto, el usuario actual no se mostrará. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Ups! help=Help @@ -74,9 +75,6 @@ info=Info - - - ############### # Pipeline # ############### @@ -187,7 +185,7 @@ adminUserSettings.internalApiUser=Usuario interno de API adminUserSettings.forceChange=Forzar usuario a cambiar usuario/contraseña en el acceso adminUserSettings.submit=Guardar Usuario adminUserSettings.changeUserRole=Cambiar rol de usuario -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -807,7 +805,7 @@ pdfOrganiser.placeholder=(por ej., 1,3,2 o 4-8,2,10-12 o 2n-1) #multiTool multiTool.title=Multi-herramienta PDF multiTool.header=Multi-herramienta PDF -multiTool.uploadPrompts=Por favor, cargue PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Ver PDF @@ -1062,7 +1060,7 @@ licenses.version=Versión licenses.license=Licencia -# error +#error error.sorry=¡Perdón por el fallo! error.needHelp=Necesita ayuda / Encontró un fallo? error.contactTip=Si sigue experimentando errores, no dude en contactarnos para solicitar soporte. Puede enviarnos un ticket en la página de GitHub o contactarnos mediante Discord: diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index cf7beabc..44a07a11 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Ezin da uneko erabiltzailearen rola jaitsi downgradeCurrentUserLongMessage=Ezin da uneko erabiltzailearen rola jaitsi. Beraz, oraingo erabiltzailea ez da erakutsiko. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Gorde Erabiltzailea adminUserSettings.changeUserRole=Erabiltzailearen rola aldatu -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=PDF erabilera anitzeko tresna multiTool.header=PDF erabilera anitzeko tresna -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 5a928516..75357694 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Impossible de supprimer l’utilisateur actuellement co deleteUsernameExistsMessage=Le nom d’utilisateur n’existe pas et ne peut pas être supprimé. downgradeCurrentUserMessage=Impossible de rétrograder le rôle de l'utilisateur actuel downgradeCurrentUserLongMessage=Impossible de rétrograder le rôle de l'utilisateur actuel. Par conséquent, l'utilisateur actuel ne sera pas affiché. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Erreur oops=Oups ! help=Aide @@ -73,6 +74,7 @@ sponsor=Sponsor info=Info + ############### # Pipeline # ############### @@ -183,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Forcer l’utilisateur à changer son nom d’utilisateur/mot de passe lors de la connexion adminUserSettings.submit=Ajouter adminUserSettings.changeUserRole=Changer le rôle de l'utilisateur -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -803,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=Outil multifonction PDF multiTool.header=Outil multifonction PDF -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Visualiser un PDF @@ -1058,7 +1060,7 @@ licenses.version=Version licenses.license=Licence -# error +#error error.sorry=Désolé pour ce problème ! error.needHelp=Besoin d’aide / Vous avez trouvé un problème ? error.contactTip=Si vous avez encore des problèmes, n’hésitez pas à nous contacter pour obtenir de l’aide. Vous pouvez soumettre un ticket sur notre page GitHub ou nous contacter via Discord : diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index 45dd8513..8fb9d830 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=मौजूदा यूज़र की भूमिका को डाउनग्रेड नहीं किया जा सकता downgradeCurrentUserLongMessage=मौजूदा यूज़र की भूमिका को डाउनग्रेड नहीं किया जा सकता। इसलिए, वर्तमान उपयोगकर्ता को नहीं दिखाया जाएगा। -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=उपयोगकर्ता को लॉगिन पर उपयोगकर्ता नाम/पासवर्ड बदलने के लिए मजबूर करें adminUserSettings.submit=उपयोगकर्ता को सहेजें adminUserSettings.changeUserRole=यूज़र की भूमिका बदलें -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=पीडीएफ मल्टी टूल multiTool.header=पीडीएफ मल्टी टूल -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=पीडीएफ देखें @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index 6195ed44..6cb09630 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=A jelenlegi felhasználó szerepkörét nem lehet visszaminősíteni downgradeCurrentUserLongMessage=Az aktuális felhasználó szerepkörét nem lehet visszaminősíteni. Ezért az aktuális felhasználó nem jelenik meg. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Kényszerítse a felhasználót a felhasználónév/jelszó megváltoztatására bejelentkezéskor adminUserSettings.submit=Felhasználó mentése adminUserSettings.changeUserRole=Felhasználó szerepkörének módosítása -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=PDF többfunkciós eszköz multiTool.header=PDF többfunkciós eszköz -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=PDF megtekintése @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 322c8a13..7dee099f 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Tidak dapat menurunkan peran pengguna saat ini downgradeCurrentUserLongMessage=Tidak dapat menurunkan peran pengguna saat ini. Oleh karena itu, pengguna saat ini tidak akan ditampilkan. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Memaksa pengguna untuk mengubah nama pengguna/kata sandi saat masuk adminUserSettings.submit=Simpan Pengguna adminUserSettings.changeUserRole=Ubah Peran Pengguna -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=Alat Multi PDF multiTool.header=Alat Multi PDF -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Lihat PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index dc389091..fb58c0af 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Impossibile eliminare l'utente attualmente connesso. deleteUsernameExistsMessage=Il nome utente non esiste e non può essere eliminato. downgradeCurrentUserMessage=Impossibile declassare il ruolo dell'utente corrente downgradeCurrentUserLongMessage=Impossibile declassare il ruolo dell'utente corrente. Pertanto, l'utente corrente non verrà visualizzato. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Errore oops=Oops! help=Aiuto @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=API utente interna adminUserSettings.forceChange=Forza l'utente a cambiare nome username/password all'accesso adminUserSettings.submit=Salva utente adminUserSettings.changeUserRole=Cambia il ruolo dell'utente -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(ad es. 1,3,2 o 4-8,2,10-12 o 2n-1) #multiTool multiTool.title=Multifunzione PDF multiTool.header=Multifunzione PDF -multiTool.uploadPrompts=Caricare il PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Visualizza PDF @@ -1059,7 +1060,7 @@ licenses.version=Versione licenses.license=Licenza -# error +#error error.sorry=Ci scusiamo per il problema! error.needHelp=Hai bisogno di aiuto / trovato un problema? error.contactTip=Se i problemi persistono, non esitare a contattarci per chiedere aiuto. Puoi inviare un ticket sulla nostra pagina GitHub o contattarci tramite Discord: diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index e62480a9..fe06fffc 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=現在ログインしているユーザーは削除で deleteUsernameExistsMessage=そのユーザー名は存在しないため削除できません。 downgradeCurrentUserMessage=現在のユーザーの役割をダウングレードできません downgradeCurrentUserLongMessage=現在のユーザーの役割をダウングレードできません。したがって、現在のユーザーは表示されません。 -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=エラー oops=おっと! help=ヘルプ @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=内部APIユーザー adminUserSettings.forceChange=ログイン時にユーザー名/パスワードを強制的に変更する adminUserSettings.submit=ユーザーの保存 adminUserSettings.changeUserRole=ユーザーの役割を変更する -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(例:1,3,2または4-8,2,10-12または2n-1) #multiTool multiTool.title=PDFマルチツール multiTool.header=PDFマルチツール -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=PDFを表示 @@ -1059,7 +1060,7 @@ licenses.version=バージョン licenses.license=ライセンス -# error +#error error.sorry=問題が発生したことをお詫び申し上げます! error.needHelp=助けが必要/問題が見つかりましたか? error.contactTip=まだ問題が解決していない場合は、お手数ですが、GitHubページでチケットを提出するか、Discordで私たちに連絡してください: diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index e1c45e88..02f19932 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -57,11 +57,10 @@ usernameExistsMessage=새 사용자명이 이미 존재합니다. invalidUsernameMessage=잘못된 사용자 이름입니다. 사용자 이름에는 문자, 숫자 및 다음 특수 문자(@._+-)만 포함할 수 있거나 유효한 이메일 주소여야 합니다. deleteCurrentUserMessage=현재 로그인한 사용자를 삭제할 수 없습니다. deleteUsernameExistsMessage=사용자 이름이 존재하지 않으며 삭제할 수 없습니다. - -info=Info downgradeCurrentUserMessage=현재 사용자의 역할을 다운그레이드할 수 없습니다 downgradeCurrentUserLongMessage=현재 사용자의 역할을 다운그레이드할 수 없습니다. 따라서 현재 사용자는 표시되지 않습니다. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=오류 oops=어머나! help=도움말 @@ -72,6 +71,7 @@ visitGithub=GitHub 저장소 방문하기 donate=기부하기 color=색상 sponsor=스폰서 +info=Info @@ -185,7 +185,7 @@ adminUserSettings.internalApiUser=내부 API 사용자 adminUserSettings.forceChange=다음 로그인 때 사용자명과 비밀번호를 변경하도록 강제 adminUserSettings.submit=사용자 저장 adminUserSettings.changeUserRole=사용자의 역할 변경 -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -805,7 +805,7 @@ pdfOrganiser.placeholder=(예: 1,3,2 또는 4-8,2,10-12 또는 2n-1) #multiTool multiTool.title=PDF 멀티툴 multiTool.header=PDF 멀티툴 -multiTool.uploadPrompts=PDF를 업로드하십시오 +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=PDF 뷰어 @@ -1060,7 +1060,7 @@ licenses.version=버전 licenses.license=라이센스 -# error +#error error.sorry=문제를 끼친 점 죄송합니다! error.needHelp=도움이 필요하신가요 / 문제가 있으신가요? error.contactTip=여전히 문제가 해결되지 않는다면 망설이지 마시고 도움을 요청하십시오. GitHub 페이지에서 티켓을 제출하거나 Discord를 통해 우리에게 연락하실 수 있습니다: diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index d0b31ab4..73525895 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Kan de rol van de huidige gebruiker niet downgraden downgradeCurrentUserLongMessage=Kan de rol van de huidige gebruiker niet downgraden. Huidige gebruiker wordt dus niet weergegeven. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Forceer gebruiker om gebruikersnaam/wachtwoord te wijzigen bij inloggen adminUserSettings.submit=Gebruiker opslaan adminUserSettings.changeUserRole=De rol van de gebruiker wijzigen -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=PDF Multitool multiTool.header=PDF Multitool -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=PDF bekijken @@ -1059,7 +1060,7 @@ licenses.version=Versie licenses.license=Licentie -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index cde729bd..6b98571b 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Nie można obniżyć roli bieżącego użytkownika downgradeCurrentUserLongMessage=Nie można obniżyć roli bieżącego użytkownika. W związku z tym bieżący użytkownik nie zostanie wyświetlony. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Zmień rolę użytkownika -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=Multi narzędzie PDF multiTool.header=Multi narzędzie PDF -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 320bc523..8f16f1e5 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Não é possível fazer downgrade da função do usuário atual downgradeCurrentUserLongMessage=Não é possível fazer downgrade da função do usuário atual. Portanto, o usuário atual não será mostrado. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Alterar Função de Usuário -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=Multiferramenta de PDF multiTool.header=Multiferramenta de PDF -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index 9ea449c9..94a076f3 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Não é possível fazer downgrade da função do utilizador atual downgradeCurrentUserLongMessage=Não é possível fazer downgrade da função do utilizador atual. Portanto, o utilizador atual não será mostrado. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Alterar usuário -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=Multiferramenta de PDF multiTool.header=Multiferramenta de PDF -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Versão licenses.license=Licença -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 977ed8d1..7297ddf3 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Rolul utilizatorului curent nu poate fi retrogradat downgradeCurrentUserLongMessage=Rolul utilizatorului curent nu poate fi retrogradat. Prin urmare, utilizatorul curent nu va fi afișat. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Schimbați rolul utilizatorului -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=Instrument PDF multiplu multiTool.header=Instrument PDF multiplu -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 89164d4c..98453a1e 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -57,10 +57,10 @@ usernameExistsMessage=Новое имя пользователя уже суще invalidUsernameMessage=Неверное имя пользователя. Имя пользователя может содержать только буквы, цифры и следующие специальные символы @._+- или должно быть действительным адресом электронной почты. deleteCurrentUserMessage=Невозможно удалить пользователя, вошедшего в систему. deleteUsernameExistsMessage=Имя пользователя не существует и не может быть удалено. -info=Info downgradeCurrentUserMessage=Невозможно понизить роль текущего пользователя downgradeCurrentUserLongMessage=Невозможно понизить роль текущего пользователя. Следовательно, текущий пользователь не будет отображаться. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Ошибка oops=Ой! help=Помощь @@ -71,7 +71,7 @@ visitGithub=Посетить репозиторий на GitHub donate=Пожертвовать color=Цвет sponsor=Спонсор - +info=Info @@ -185,7 +185,7 @@ adminUserSettings.internalApiUser=Внутренний пользователь adminUserSettings.forceChange=Просить пользователя изменить пароль при входе в систему adminUserSettings.submit=Сохранить пользователя adminUserSettings.changeUserRole=Изменить роль пользователя -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -805,7 +805,7 @@ pdfOrganiser.placeholder=(например, 1,3,2 или 4-8,2,10-12 или 2n-1 #multiTool multiTool.title=Мультиинструмент PDF multiTool.header=Мультиинструмент PDF -multiTool.uploadPrompts=Пожалуйста, загрузите PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Просмотреть PDF @@ -1060,7 +1060,7 @@ licenses.version=Версия licenses.license=Лицензия -# error +#error error.sorry=Извините за проблему! error.needHelp=Нужна помощь / Нашли проблему? error.contactTip=Если у вас все еще есть проблемы, не стесняйтесь обращаться к нам за помощью. Вы можете отправить заявку на нашей странице GitHub или связаться с нами через Discord: diff --git a/src/main/resources/messages_sk_SK.properties b/src/main/resources/messages_sk_SK.properties index 124f51f9..00970c4a 100644 --- a/src/main/resources/messages_sk_SK.properties +++ b/src/main/resources/messages_sk_SK.properties @@ -59,6 +59,8 @@ deleteCurrentUserMessage=Nie je možné zmazať aktuálne prihláseného použí deleteUsernameExistsMessage=Používateľské meno neexistuje a nemôže byť zmazané. downgradeCurrentUserMessage=Nie je možné znížiť rolu aktuálneho používateľa downgradeCurrentUserLongMessage=Nie je možné znížiť rolu aktuálneho používateľa. Preto, aktuálny používateľ nebude zobrazený. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Chyba oops=Ups! help=Pomoc @@ -69,6 +71,7 @@ visitGithub=Navštíviť GitHub repozitár donate=Darovať color=Farba sponsor=Sponzorovať +info=Info @@ -102,12 +105,18 @@ pipelineOptions.validateButton=Overiť ############# # NAVBAR # ############# -navbar.convert=Konvertovať -navbar.security=Bezpečnosť -navbar.other=Rôzne +navbar.favorite=Favorites navbar.darkmode=Tmavý režim -navbar.pageOps=Operácie so stránkami +navbar.language=Languages navbar.settings=Nastavenia +navbar.allTools=Tools +navbar.multiTool=Multi Tools +navbar.sections.organize=Organize +navbar.sections.convertTo=Convert to PDF +navbar.sections.convertFrom=Convert from PDF +navbar.sections.security=Sign & Security +navbar.sections.advance=Advanced +navbar.sections.edit=View & Edit ############# # SETTINGS # @@ -176,6 +185,7 @@ adminUserSettings.internalApiUser=Interný API používateľ adminUserSettings.forceChange=Donútiť používateľa zmeniť heslo pri prihlásení adminUserSettings.submit=Uložiť používateľa adminUserSettings.changeUserRole=Zmeniť rolu používateľa +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -742,6 +752,7 @@ extractImages.submit=Extrahovať fileToPDF.title=Súbor do PDF fileToPDF.header=Konvertovať akýkoľvek súbor do PDF fileToPDF.credit=Táto služba používa LibreOffice a Unoconv pre konverziu súborov. +fileToPDF.supportedFileTypesInfo=Supported File types fileToPDF.supportedFileTypes=Podporované typy súborov by mali zahŕňať nižšie uvedené, avšak pre úplný aktualizovaný zoznam podporovaných formátov, prosím, odkazujte na dokumentáciu LibreOffice fileToPDF.submit=Konvertovať do PDF @@ -794,7 +805,7 @@ pdfOrganiser.placeholder=(napr. 1,3,2 alebo 4-8,2,10-12 alebo 2n-1) #multiTool multiTool.title=PDF Multi Nástroj multiTool.header=PDF Multi Nástroj -multiTool.uploadPrompts=Prosím, nahrajte PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Zobraziť PDF @@ -1049,7 +1060,7 @@ licenses.version=Verzia licenses.license=Licencia -# error +#error error.sorry=Ospravedlňujeme sa za problém! error.needHelp=Potrebujete pomoc / Našli ste problém? error.contactTip=Ak máte stále problémy, neváhajte nás kontaktovať pre pomoc. Môžete podať tiket na našej stránke GitHub alebo nás kontaktovať cez Discord: diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index 1d10eaae..4ac3d903 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Nije moguće degradirati ulogu trenutnog korisnika downgradeCurrentUserLongMessage=Nije moguće unazaditi ulogu trenutnog korisnika. Dakle, trenutni korisnik neće biti prikazan. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Prisili korisnika da promeni korisničko ime/lozinku pri prijavi adminUserSettings.submit=Sačuvaj korisnika adminUserSettings.changeUserRole=Promenite ulogu korisnika -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=PDF Multi Alatka multiTool.header=PDF Multi Alatka -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Prikaz @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index e5fbb818..049325a9 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Cannot delete currently logged in user. deleteUsernameExistsMessage=The username does not exist and cannot be deleted. downgradeCurrentUserMessage=Kan inte nedgradera nuvarande användares roll downgradeCurrentUserLongMessage=Kan inte nedgradera nuvarande användares roll. Därför kommer den aktuella användaren inte att visas. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Internal API User adminUserSettings.forceChange=Force user to change password on login adminUserSettings.submit=Save User adminUserSettings.changeUserRole=Ändra användarens roll -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) #multiTool multiTool.title=PDF-multiverktyg multiTool.header=PDF Multi-verktyg -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=View PDF @@ -1059,7 +1060,7 @@ licenses.version=Version licenses.license=License -# error +#error error.sorry=Sorry for the issue! error.needHelp=Need help / Found an issue? error.contactTip=If you're still having trouble, don't hesitate to reach out to us for help. You can submit a ticket on our GitHub page or contact us through Discord: diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index 0f547dc4..10649a96 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Şu anda oturum açmış olan kullanıcı silinemiyor. deleteUsernameExistsMessage=Kullanıcı adı mevcut değil ve silinemez. downgradeCurrentUserMessage=Mevcut kullanıcının rolü düşürülemiyor downgradeCurrentUserLongMessage=Mevcut kullanıcının rolü düşürülemiyor. Bu nedenle, mevcut kullanıcı gösterilmeyecektir. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Hata oops=Tüh! help=Yardım @@ -69,8 +70,8 @@ seeDockerHub=Docker Hub'a bakın visitGithub=Github Deposunu Ziyaret Edin donate=Bağış Yapın color=Renk -info=Info sponsor=Bağış +info=Info @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Dahili API Kullanıcısı adminUserSettings.forceChange=Kullanıcının girişte kullanıcı adı/şifre değiştirmesini zorla adminUserSettings.submit=Kullanıcıyı Kaydet adminUserSettings.changeUserRole=Kullanıcı rolünü değiştir -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(örn. 1,3,2 veya 4-8,2,10-12 veya 2n-1) #multiTool multiTool.title=PDF Çoklu Araç multiTool.header=PDF Çoklu Araç -multiTool.uploadPrompts=Lütfen PDF Yükleyin +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=PDF Görüntüle @@ -1059,7 +1060,7 @@ licenses.version=Versiyon licenses.license=Lisans -# error +#error error.sorry=Sorun için özür dileriz! error.needHelp=Yardıma mı ihtiyacınız var / Bir sorun mu buldunuz? error.contactTip=Hala sorun yaşıyorsanız, yardım için bize ulaşmaktan çekinmeyin. GitHub sayfamızdan bir bilet gönderebilir veya Discord üzerinden bizimle iletişime geçebilirsiniz: diff --git a/src/main/resources/messages_uk_UA.properties b/src/main/resources/messages_uk_UA.properties index 60fc4dda..c77f63de 100644 --- a/src/main/resources/messages_uk_UA.properties +++ b/src/main/resources/messages_uk_UA.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=Неможливо видалити користува deleteUsernameExistsMessage=Ім'я користувача не існує і не може бути видалено. downgradeCurrentUserMessage=Неможливо понизити роль поточного користувача downgradeCurrentUserLongMessage=Неможливо понизити роль поточного користувача. Отже, поточний користувач не відображатиметься. -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=Error oops=Oops! help=Help @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=Внутрішній користувач API adminUserSettings.forceChange=Примусити користувача змінити пароль при вході в систему adminUserSettings.submit=Зберегти користувача adminUserSettings.changeUserRole=Змінити роль користувача -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(наприклад, 1,3,2 або 4-8,2,10-12 або 2n #multiTool multiTool.title=Мультіінструмент PDF multiTool.header=Мультіінструмент PDF -multiTool.uploadPrompts=Будь ласка, завантажте PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=Переглянути PDF @@ -1059,7 +1060,7 @@ licenses.version=Версія licenses.license=Ліцензія -# error +#error error.sorry=Вибачте за незручності! error.needHelp=Потрібна допомога / Знайшли проблему? error.contactTip=Якщо у вас досі виникають проблеми, не соромтеся звертатися до нас за допомогою. Ви можете надіслати запит на нашій сторінці GitHub або зв'язатися з нами через Discord: diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 6209b052..a94cf9a8 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -59,7 +59,8 @@ deleteCurrentUserMessage=无法删除当前登录的用户。 deleteUsernameExistsMessage=用户名不存在,无法删除。 downgradeCurrentUserMessage=无法降级当前用户的角色 downgradeCurrentUserLongMessage=无法降级当前用户的角色。因此,当前用户将不会显示。 -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=错误 oops=哎呀! help=帮助 @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=内部API用户 adminUserSettings.forceChange=强制用户在登录时更改用户名/密码 adminUserSettings.submit=保存用户 adminUserSettings.changeUserRole=更改用户角色 -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(例如 1,3,2 或 4-8,2,10-12 或 2n-1) #multiTool multiTool.title=PDF多功能工具 multiTool.header=PDF多功能工具 -multiTool.uploadPrompts=上传PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=浏览PDF @@ -1059,7 +1060,7 @@ licenses.version=版本 licenses.license=许可证 -# error +#error error.sorry=对此问题感到抱歉! error.needHelp=需要帮助 / 发现问题? error.contactTip=如果你仍然遇到问题,不要犹豫,向我们寻求帮助。你可以在我们的GitHub页面上提交工单,或者通过Discord与我们联系: diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index ab138908..0ed9e43a 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -57,10 +57,10 @@ usernameExistsMessage=新使用者名稱已存在。 invalidUsernameMessage=使用者名稱無效,使用者名稱只能包含字母、數字和以下特殊字元@._+- 或必須是有效的電子郵件地址。 deleteCurrentUserMessage=無法刪除目前登錄的使用者。 deleteUsernameExistsMessage=使用者名不存在,無法刪除。 -info=Info downgradeCurrentUserMessage=無法降級目前使用者的角色 downgradeCurrentUserLongMessage=無法降級目前使用者的角色。因此,不會顯示目前的使用者。 -userAlreadyExistsMessage=OAuth2: User already exists. +userAlreadyExistsOAuthMessage=The user already exists as an OAuth2 user. +userAlreadyExistsWebMessage=The user already exists as an web user. error=錯誤 oops=哎呀! help=幫助 @@ -71,6 +71,7 @@ visitGithub=訪問Github存儲庫 donate=捐贈 color=顏色 sponsor=贊助 +info=Info @@ -184,7 +185,7 @@ adminUserSettings.internalApiUser=內部 API 使用者 adminUserSettings.forceChange=強制使用者在登入時修改使用者名稱/密碼 adminUserSettings.submit=儲存 adminUserSettings.changeUserRole=更改使用者身份 -adminUserSettings.authenticated=Authentication type +adminUserSettings.authenticated=Authenticated ############# # HOME-PAGE # @@ -804,7 +805,7 @@ pdfOrganiser.placeholder=(例如 1,3,2 或 4-8,2,10-12 或 2n-1) #multiTool multiTool.title=PDF 多工具 multiTool.header=PDF 多工具 -multiTool.uploadPrompts=Please Upload PDF +multiTool.uploadPrompts=File Name #view pdf viewPdf.title=檢視 PDF @@ -1059,7 +1060,7 @@ licenses.version=版本 licenses.license=許可證 -# error +#error error.sorry=對於這個問題,我們感到抱歉! error.needHelp=需要幫助/發現了一個問題? error.contactTip=如果你仍然遇到問題,請不要猶豫,隨時向我們尋求幫助。你可以在我們的GitHub頁面提交工單,或通過Discord與我們聯繋: diff --git a/src/main/resources/settings.yml.template b/src/main/resources/settings.yml.template index a69f11e3..d7d1fcfa 100644 --- a/src/main/resources/settings.yml.template +++ b/src/main/resources/settings.yml.template @@ -8,12 +8,11 @@ security: loginAttemptCount: 5 # lock user account after 5 tries loginResetTimeMinutes : 120 # lock account for 2 hours after x attempts # oauth2: - # enabled: true # set to 'true' to enable login (Note: enableLogin must also be 'true' for this to work) + # enabled: false # set to 'true' to enable login (Note: enableLogin must also be 'true' for this to work) # issuer: "" # set to any provider that supports OpenID Connect Discovery (/.well-known/openid-configuration) end-point # clientId: "" # Client ID from your provider # clientSecret: "" # Client Secret from your provider - # autoCreateUser: true # set to 'true' to allow auto-creation of non-existing users - # autoCreateUser: true # Set to 'true' to automatically create users who do not already exist in the system + # autoCreateUser: false # set to 'true' to allow auto-creation of non-existing users # useAsUsername: "email" # Default is 'email'; custom fields can be used as the username # scopes: "openid, profile, email" # Specify the scopes for which the application will request permissions # provider: "google" # Set this to your OAuth provider's name, e.g., 'google' or 'keycloak' @@ -24,7 +23,7 @@ system: enableAlphaFunctionality: false # Set to enable functionality which might need more testing before it fully goes live (This feature might make no changes) showUpdate: true # see when a new update is available showUpdateOnlyAdmin: false # Only admins can see when a new update is available, depending on showUpdate it must be set to 'true' - + ui: appName: null # Application's visible name homeDescription: null # Short description or tagline shown on homepage. diff --git a/src/main/resources/static/js/thirdParty/jquery.validate.min.js b/src/main/resources/static/js/thirdParty/jquery.validate.min.js new file mode 100644 index 00000000..442a4131 --- /dev/null +++ b/src/main/resources/static/js/thirdParty/jquery.validate.min.js @@ -0,0 +1,4 @@ +/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022 + * https://jqueryvalidation.org/ + * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a}); \ No newline at end of file diff --git a/src/main/resources/templates/account.html b/src/main/resources/templates/account.html index c82c97cb..727de224 100644 --- a/src/main/resources/templates/account.html +++ b/src/main/resources/templates/account.html @@ -1,300 +1,277 @@ - - - + + - + - - -
-
- -

-
-
-
+ + +
+
+ +

+
+
+
- -

User Settings

- -
- Default message if not found + +

User Settings

+ +
+ Default message if not found
-
- Default message if not found -
-
- Default message if not found -
-
- Default message if not found -
-
- Default message if not found -
-
- -

User!

- + + +

User!

+ - - -

Change Username?

-
-
- - -
-
- - -
-
- -
-
- - -

Change Password?

-
-
- - -
-
- - -
-
- - -
-
- -
-
+ + + +

Change Username?

+
+
+ + +
+
+ + +
+
+ +
+
+
+ + +

Change Password?

+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+

API Key

-
-
-
-
- -
- - - + + + +
-
- -

Sync browser settings with Account

-
-

Settings Comparison:

- - - - - - - - - - - -
PropertyAccount SettingWeb Browser Setting
+ async function refreshApiKey() { + try { + let response = await fetch('/api/v1/user/update-api-key', { method: 'POST' }); + if (response.status === 200) { + let apiKey = await response.text(); + manageUIState(apiKey); + document.getElementById("apiKey").type = 'text'; + document.getElementById("copyBtn").disabled = false; + } else { + alert('Error refreshing API key.'); + } + } catch (error) { + console.error('There was an error:', error); + } + } -
- - + function manageUIState(apiKey) { + const apiKeyElement = document.getElementById("apiKey"); + const showBtn = document.getElementById("showBtn"); + const copyBtn = document.getElementById("copyBtn"); + + if (apiKey && apiKey.trim().length > 0) { + apiKeyElement.value = apiKey; + showBtn.disabled = false; + copyBtn.disabled = true; + } else { + apiKeyElement.value = ""; + showBtn.disabled = true; + copyBtn.disabled = true; + } + } + + document.addEventListener("DOMContentLoaded", function() { + const form = document.querySelector('form[action="api/v1/user/change-password"]'); + + form.addEventListener('submit', function(event) { + const newPassword = document.getElementById('newPassword').value; + const confirmNewPassword = document.getElementById('confirmNewPassword').value; + + if (newPassword !== confirmNewPassword) { + alert('New Password and Confirm New Password must match.'); + event.preventDefault(); // Prevent form submission + } + }); + }); + + +

Sync browser settings with Account

+
+

Settings Comparison:

+ + + + + + + + + + + +
PropertyAccount SettingWeb Browser Setting
+ +
+ + +
-
- -
+
- -
- - + \ No newline at end of file diff --git a/src/main/resources/templates/addUsers.html b/src/main/resources/templates/addUsers.html index 73cb9e86..e87726cf 100644 --- a/src/main/resources/templates/addUsers.html +++ b/src/main/resources/templates/addUsers.html @@ -16,9 +16,8 @@

Admin User Control Settings

-
- Cannot delete currently logged in user. - The username does not exist and cannot be deleted. +
+ Message
@@ -26,7 +25,7 @@ - + @@ -44,15 +43,15 @@
Username Roles ActionsAuthentication typeAuthenticated

Add New User

-
- Default message if not found - Default message if not found +
+ Default message if not found
-
+
+
@@ -76,9 +75,8 @@

Change User's Role

-
- Username not found - Cannot downgrade current user's role +
+ Default message if not found
@@ -104,9 +102,55 @@
diff --git a/src/main/resources/templates/change-creds.html b/src/main/resources/templates/change-creds.html index feee43c1..30e06688 100644 --- a/src/main/resources/templates/change-creds.html +++ b/src/main/resources/templates/change-creds.html @@ -17,18 +17,9 @@

User Settings


- -
- Default message if not found -
-
- Default message if not found -
-
- Default message if not found -
-
- Default message if not found + +
+ Default message if not found
diff --git a/src/main/resources/templates/fragments/common.html b/src/main/resources/templates/fragments/common.html index a1b6828b..635d0952 100644 --- a/src/main/resources/templates/fragments/common.html +++ b/src/main/resources/templates/fragments/common.html @@ -1,174 +1,170 @@ - - + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - - - - - - + + + + + + + + + - + - - - - - - - - - + + + + + + + + + - - + + - - - - - - - + + + + + + - - -
-
Lives: 3
-
Score: 0
-
High Score: 0
-
Level: 1
- favicon -
- -
+ +
+
Lives: 3
+
Score: 0
+
High Score: 0
+
Level: 1
+ favicon +
+ +
- - - + + + -
-
- -
-
-
+
+
+ +
+
+
- - + +
\ No newline at end of file diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 2366ad20..085283c2 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -112,41 +112,32 @@ } } +
+ favicon -
- Login Via SSO -
-
- -
OAuth2: Auto-Create User Disabled.
- -
OAuth2: User already exists.
- -
OAUTH2: Invalid username.
- -
Invalid username or password.
- -
Your account has been locked.
+

Stirling-PDF

+
+ Login Via SSO +
+
+
+
OAuth2: Error Message
+
+
-
-
-
-
-
- Default message if not found + +
+
OAuth2: Error Message
+
+
+
+
+ Default message if not found +
-
- -

Stirling-PDF

-
- Login Via SSO -
-
OAUTH2 Auto-Create User Disabled.
-
-
- +

Please sign in

@@ -171,7 +162,7 @@
@@ -180,4 +171,4 @@
- + \ No newline at end of file