From 18fd5798eda038ba4c68553cee4a2d841feadcf6 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Fri, 8 Nov 2024 16:15:11 -0800 Subject: [PATCH] Fix core.Users.HasPassword --- core/module.properties | 2 +- core/resources/schemas/dbscripts/postgresql/core-create.sql | 4 ++-- core/src/org/labkey/core/admin/AdminController.java | 2 +- core/src/org/labkey/core/login/LoginController.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/module.properties b/core/module.properties index 7e84d1d148c..446a966671c 100644 --- a/core/module.properties +++ b/core/module.properties @@ -1,6 +1,6 @@ Name: Core ModuleClass: org.labkey.core.CoreModule -SchemaVersion: 24.009 +SchemaVersion: 24.010 Label: Administration and Essential Services Description: The Core module provides central services such as login, \ security, administration, folder management, user management, \ diff --git a/core/resources/schemas/dbscripts/postgresql/core-create.sql b/core/resources/schemas/dbscripts/postgresql/core-create.sql index 78414e160dd..0acfc95dad0 100644 --- a/core/resources/schemas/dbscripts/postgresql/core-create.sql +++ b/core/resources/schemas/dbscripts/postgresql/core-create.sql @@ -14,10 +14,10 @@ * limitations under the License. */ CREATE VIEW core.Users AS - SELECT p.Name AS Email, ud.*, p.Active, l.Email IS NOT NULL AS HasPassword + SELECT p.Name AS Email, ud.*, p.Active, l.UserId IS NOT NULL AS HasPassword FROM core.Principals p INNER JOIN core.UsersData ud ON p.UserId = ud.UserId - LEFT OUTER JOIN core.Logins l ON p.Name = l.Email + LEFT OUTER JOIN core.Logins l ON p.UserId = l.UserId WHERE Type = 'u'; CREATE OR REPLACE RULE Users_Update AS diff --git a/core/src/org/labkey/core/admin/AdminController.java b/core/src/org/labkey/core/admin/AdminController.java index e8d98a9433d..13b9765e196 100644 --- a/core/src/org/labkey/core/admin/AdminController.java +++ b/core/src/org/labkey/core/admin/AdminController.java @@ -6282,7 +6282,7 @@ private static void throwIfUnauthorizedFileRootChange(ViewContext ctx, FileConte if (StringUtils.equalsIgnoreCase(absolutePath, form.getFolderRootPath())) { if (!ctx.getUser().hasRootPermission(AdminOperationsPermission.class)) - throw new UnauthorizedException("Only site admins change change file roots"); + throw new UnauthorizedException("Only site admins can change file roots"); } } } diff --git a/core/src/org/labkey/core/login/LoginController.java b/core/src/org/labkey/core/login/LoginController.java index f277ab73756..f279c320691 100644 --- a/core/src/org/labkey/core/login/LoginController.java +++ b/core/src/org/labkey/core/login/LoginController.java @@ -1781,7 +1781,7 @@ public static void checkVerificationErrors(boolean isVerified, User user, Errors else { // Verification string wasn't found. User might have already verified, they don't have a login (should be - // using LDAP or SSO), or the link got mangled. Don't provide any guidance since that could reveal + // using LDAP or SSO), or the link got mangled. Don't provide detailed guidance since that could reveal // information about existing users. errors.reject("setPassword", "Verification failed. Make sure you've copied the entire link into your browser's address bar."); }