-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: provision api's status codes #47846
Conversation
This is to align with https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/instruction_set_for_users.html, right? |
The next step would be to update that too, once this gets approved, both code and documentation have inconsistencies |
These number codes are so ... Any specific reason you want to touch them? Or where is this originating from? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the Talk Android and iOS mobile clients as those are also using the API. But doesn't seem they are checking the exact error code, but are basically either OK or show whatever the message is.
So seems kind of Yolo in that regard and we should just make sure that code matches docs afterwards
But we have integration tests that ensure the numbers stay. So better to keep those and fix the docs? |
966e5e6
to
3128f0d
Compare
Signed-off-by: Hamza Mahjoubi <[email protected]>
3128f0d
to
9be2f06
Compare
/backport to stable30 |
/backport to stable29 |
/backport to stable28 |
Summary
addUser
callseditUser
which creates inconsistencies in status codesTODO
More info
OLD
CODE:
New user ( affected by Edit user exceptions )
101: Invalid password value/argument
102: User already exists | Sub-admin group does not exist
103: Cannot create sub-admins for admin group
104: Group does not exist
105: Insufficient privileges for group
106: No group specified (required for sub-admins)
107: Hint exceptions
108: An email address is required, to send a password link to the user.
110: Required email address was not provided
111: Could not create non-existing user ID
Edit user:
101: Invalid argument
102: Invalid Quota /password / language / locale / first day of the week
103: No permission to edit a field / (password policy / Setting the password is not supported by the users backend)
998: user Not found
Documentation
New user:
Edit user:
NEW
New user ( affected by Edit user exceptions )
101: Invalid password value/argument
102: User already exists
103: Cannot create sub-admins for admin group
104: Group does not exist
105: Insufficient privileges for group
106: No group specified (required for sub-admins)
107: Hint exceptions
108: An email address is required, to send a password link to the user.
109: Sub-admin group does not exist
110: Required email address was not provided
111: Could not create non-existing user ID
Edit user:
101: Invalid argument /Invalid Quota /password / language / locale / first day of the week
107: password policy (hint exception)
112: Setting the password is not supported by the users backend
113: editing field not allowed/ field doesn’t exist
Checklist