anancarv / python-artifactory

Typed interactions with the Jfrog Artifactory REST API
MIT License
55 stars 50 forks source link

Email should be optional as admin may have none #102

Closed Vyjill closed 2 years ago

Vyjill commented 2 years ago

Even if the email field is somewhat required, is some events such as fetching the admin user, the UserResponse class fails to parse artifactory's answer.

anancarv commented 2 years ago

Hi @Vyjill , As you said, the email field is required. you can see it in the following artifactory documentation: https://www.jfrog.com/confluence/display/JFROG/Security+Configuration+JSON#SecurityConfigurationJSON-application/vnd.org.jfrog.artifactory.security.User+json

I cannot see any use case where an admin is created without this field. Do you have an example to enlighten me for me to see if I can validate this PR ?

Vyjill commented 2 years ago

Hi back,

Thank you for your answer.

It is quite possibly a bad configuration from myself, but the default admin that I have created on artifactory at setup have no email configured.

I will investigate further on my side, but I seem to be able (on artifactory 6) to create users without email using the api.

I imagine it is just a wierd quirk on my setup, so as accepting this PR will drift this lib off artifactory's official specifications, it might not be a worth modification.