Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspend user, still shows as active? #626

Closed
vikingtoby opened this issue Aug 18, 2023 · 5 comments
Closed

Suspend user, still shows as active? #626

vikingtoby opened this issue Aug 18, 2023 · 5 comments

Comments

@vikingtoby
Copy link

Summary

When I suspend a user in my cronicle web interface, it still shows as active on the /#Admin?sub=users page?
It's correctly suspended when I edit it again.

Steps to reproduce the problem

Create an admin user, suspend it, still shows as "Active"

Your Setup

1x master
3x workers

Operating system and version?

AlmaLinux release 8.8 (Sapphire Caracal)

Node.js version?

nodejs-full-i18n-16.20.1-1.module_el8.8.0+3594+e74fe53f.x86_64
nodejs-16.20.1-1.module_el8.8.0+3594+e74fe53f.x86_64
nodejs-docs-16.20.1-1.module_el8.8.0+3594+e74fe53f.noarch

Cronicle software version?

0.9.28

Are you using a multi-server setup, or just a single server?

Multi-server, but single master

Are you using the filesystem as back-end storage, or S3/Couchbase?

ZFS, local filesystem

Log Excerpts

@jhuckaby
Copy link
Owner

Oh boy, you're good at finding bugs. This one is like 10 years old. Well done.

Fixing right now...

@vikingtoby
Copy link
Author

Updated to 0.9.29, no change.

Further testing, seems like suspend doesn't work at all.
The user is still logged when visiting the web interface again, and can also still log in.

@jhuckaby
Copy link
Owner

Yeah, I know, I see it. It's a nasty bug. Fixing ASAP.

@jhuckaby
Copy link
Owner

Fixed in v0.9.30. Thank you again!

Note that the bug creates a bit of a "mess" in the user database, so you'll have to edit and re-save users to fix the issue. The UI was collecting the status of the account as "1" for enabled or "0" for disabled/suspended, but they were STRINGS 🤦🏻‍♂️. And in Node.js, "0" as a string evaluates to true, so it was being treated as active even if suspended.

If you edit a user and re-save, it will properly save the status as an integer (1 or 0), and then it will work properly from that point onward.

Thanks again!

@vikingtoby
Copy link
Author

Upgraded, works perfectly!

Thanks for the awesome software and extremely quick bugfixing 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants