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

user.groups and user.projects required or optional? #104

Closed
musicEnfanthen opened this issue Sep 28, 2021 · 2 comments
Closed

user.groups and user.projects required or optional? #104

musicEnfanthen opened this issue Sep 28, 2021 · 2 comments
Assignees

Comments

@musicEnfanthen
Copy link

According to the ontology.json the properties groups and projects are not required within a User object in the JSON data model: https://github.com/dasch-swiss/dsp-tools/blob/main/knora/dsplib/schemas/ontology.json#L127

However, the docs say, that "A user must be member of at least one project.": https://dasch-swiss.github.io/dsp-tools/dsp-tools-create/#users

Additionally, the onto_create_ontology.py assumes that there is a user.group and a user.projects even if a user is given without these optional properties: https://github.com/dasch-swiss/dsp-tools/blob/main/knora/dsplib/utils/onto_create_ontology.py#L161 and https://github.com/dasch-swiss/dsp-tools/blob/main/knora/dsplib/utils/onto_create_ontology.py#L188

There should be a check first if the optional properties exist, like: if user["groups"] is not None:

@irinaschubert irinaschubert self-assigned this Oct 4, 2021
@irinaschubert
Copy link

Hi @musicEnfanthen , thank you for the report. We fixed it in dsp-tools version 1.6.1 which has just been released. Both projects and groups are optional inside a user. I updated the documentation and the code, so that no error message appears if you leave one (or both) out. I hereby close this issue.

@musicEnfanthen
Copy link
Author

Thank you @irinaschubert for the fix in #121

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

2 participants