-
Notifications
You must be signed in to change notification settings - Fork 16
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
added preferences view and allow for updating delimiter (#closes 220) #221
Conversation
app/main/views/corpus.py
Outdated
@@ -260,3 +261,56 @@ def search_value_api(corpus_id, allowed_type): | |||
if result is not None | |||
] | |||
) | |||
|
|||
|
|||
def _update_delimiter_token(corpus: Corpus): |
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.
In terms of design, I would rather have this as a method of Corpus:
def update_delimiter_token(self, delimiter: Optional[str] = None):
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.
done
Except for the comment, I think I can 95% guarantee that the delimiter is not yet used in anything else than export :) |
app/main/views/corpus.py
Outdated
is_owner = corpus_user.is_owner | ||
else: | ||
# admin | ||
is_owner = True |
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.
@carinedengler not sure to understand how the admin case is handled here (not being a corpus user does not make me an admin)
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.
Looks good to me otherwise
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.
@carinedengler not sure to understand how the admin case is handled here (not being a corpus user does not make me an admin)
the reasoning was that if the user has access to the corpus, but is not part of the corpus users, it must be an admin, is there a case where this is not true?
I adapted it and added an explicit check for admin nonetheless
Hi,
I added the preferences view with a field to update the delimiter. I'm not sure I found all the places where the delimiter is used, I only tested that the updated delimiter is used when exporting the tokens in TEI format.
Carine