Improve /quota-update endpoint #397
Replies: 3 comments 6 replies
-
these values are loaded only when the user logins, if you change them they will be applyed the next time it logins
This happen because Go assume 0 for int64 if you don't pass it. I can fix this by making the receiver a pointer and checking if it is not nil |
Beta Was this translation helpful? Give feedback.
-
I'm too tired to test this now, I'll check it tomorrow. Based on the code here, the omitted field is setted to 0 and so it should not change the actual value, it should create an sql update like this one |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, Can someone help me how to set a default quota for all users who log into sftpgo. I'm using helm chart in kubernetes. |
Beta Was this translation helpful? Give feedback.
-
I would like to suggest two improvements for this endpoint:
Support "quota_size" and "quota_files" fields. This endpoint doesn't support updating these two fields and forces us to use "update user" endpoint, but then we have to force disconnect users if we want to activate these changes.
If a field is omitted do not set it to 0. I don't know why this is like this currently, since if a user intends to set it to 0, they can do that explicitly. This cahnge would allow us to easily change only the fields that we want.
Beta Was this translation helpful? Give feedback.
All reactions