-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
PruneUserJob realm bug #126
Labels
bug
Something isn't working
Comments
GunniBusch
added a commit
to GunniBusch/panel
that referenced
this issue
Dec 30, 2024
Fixes ConvoyPanel#126 Filter users by realm type before converting them into UserData in the `getUsers` method in `app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php`. * Add a check to see if the realm type can be casted to the `RealmType` enum before creating a `UserData` object. * Ignore users with realm types different than those in the enum. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ConvoyPanel/panel/issues/126?shareId=XXXX-XXXX-XXXX-XXXX).
This was referenced Dec 30, 2024
Hello, thanks for your report! When is realm type not defined as |
For example if someone uses openid. https://pve.proxmox.com/wiki/User_Management#pveum_authentication_realms But I see that the realm types are fixed. So you can add the missing ones to the enum:
I can update the pr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
If proxmox has users in different realms as specified in
panel/app/Enums/Node/Access/RealmType.php
Lines 5 to 9 in bdc9c41
The reason is, that convoy gets all users, and converts them into UserData. UserData, casts the realm into said enum.
Consequently there will be an error, before a deletion can occur. See here:
panel/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php
Line 24 in bdc9c41
To fix this, I would suggest when getting users, first to check if the realm can be casted, and only then creating a Data Object.
Expected Behavior
As pointed out earlier, to ignore users with realm type different than in the enum
Steps to Reproduce
Create a user with a realm eg. openid and run the job PruneUserJob
Screenshots
No response
Proxmox OS Version
/
Operating System
/
Browser
/
Additional Context
No response
Panel Version
4.2.4
Error Logs
No response
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: