Skip to content

Commit

Permalink
Fix core.Users.HasPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam committed Nov 9, 2024
1 parent c30f7a3 commit 18fd579
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/module.properties
Original file line number Diff line number Diff line change
@@ -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, \
Expand Down
4 changes: 2 additions & 2 deletions core/resources/schemas/dbscripts/postgresql/core-create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/org/labkey/core/admin/AdminController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/org/labkey/core/login/LoginController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down

0 comments on commit 18fd579

Please sign in to comment.