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

Enabling/Disabling user via set_user_attribute does not behave as expected #278

Closed
Sebaristoteles opened this issue Aug 29, 2022 · 1 comment

Comments

@Sebaristoteles
Copy link

Hi,

I am using pyocclient to administer users and groups. Creation, adding, and removing works well.
For some use case, I want to disable a user. The option that I found was via 'set_user_attribute'. This works for each changing the name of the user.
When I use get_user('name'), I get either the key-value-pair "'enabled': None" or "'enabled': '1'". In each case, I cannot change to the other option with "set_user_attribute('name', key='enabled', value=None)" or "oc.set_user_attribute('name', key='enabled', value='1')".

If you wonder why you might not have this key-value-pair, I am using the pyoclient for administering a Nextcloud. This works well with the provided functions. I think my question is still valid because the switch between 'None' and some value like '1' might still be a use case for owncloud user attributes.

Thanks for consideration!

@Sebaristoteles
Copy link
Author

This feature pull request (not implemented as of today) solved my issue.
#275

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

1 participant