Age | Commit message (Expand) | Author |
2024-04-30 | Remove unused imports.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-30 | Pass JWT tokens to gn3.•••* gn2/wqflask/edit.py (save): Pass the JWT from gn-auth to GN3.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-30 | Remove unused imports.•••* gn2/wqflask/edit.py: Delete subprocess, Paht, Either, Left, Right.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-30 | Delete __run__cmd__.•••* gn2/wqflask/edit.py (__run_cmd__): Delete.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-30 | Remove methods for fetching a dataset's metadata edit history.•••* gn2/wqflask/edit.py (__fetch_dataset_git_history__): Delete
(view_history): Delete.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-30 | Delete function for saving metadata.•••* gn2/wqflask/edit.py (save_dataset_metadata): Delete.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-30 | Create a JWT to pass in secinfo to a GN3 editing endpoint.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-02 | Display a history page containing all the edits.•••* gn2/wqflask/edit.py (__fetch_dataset_git_history__): New function.
(view_history): New end-point.
* gn2/wqflask/templates/dataset.html: Use htmx to fetch history.
* gn2/wqflask/templates/dataset_history.html: New history page.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-02 | Properly chain all the git and write operations together.•••* gn2/wqflask/edit.py (save_dataset_metadata): Chain running the git
commands and the write operation together.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-04-02 | Refactor __run_cmd into private function __run_cmd__.•••* gn2/wqflask/edit.py: Import Right. Delete curry.
(save_dataset_metadata)[__run_cmd]: Move this...
(__run_cmd__): ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Add missing docstrings to save/metadata_edit functions.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Add a final fallback for match expression.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Use "require_oauth2_edit_resource_access" for edit/save endpoints.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Replace "__" prefix for with "_".•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Auto-pep8 (using flake8) file.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Replace "login_required" with "require_oauth2".•••* gn2/wqflask/edit.py: Replace "login_required" import with
"require_oauth2".
(metadata_edit): Replace "login_required" with "require_oauth2".
(edit): Ditto.
(save): Ditto.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Reset repo and pull then write changes before committing.•••* gn2/wqflask/edit.py: Import session_info.
(save_dataset_metadata): Add author as an argument. Reset repo and
pull then write changes before committing. Split strings before
__run_cmd is called.
(metadata_edit): Rename "metadata" -> "__metadata".
(save): Save the output to the correct path. Pass author to
"save_dataset_metadata".
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Prevent shell injection by disabling shell invocation in subprocess.•••See:
<https://stackoverflow.com/questions/52019920/python3-sanitizing-user-input-passed-to-shell-as-parameter>
for more information.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Replace Path construct with a format string.•••Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Add missing "curry" to __run_cmd.•••This is required to be able to pass __run_cmd through a pipeline.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Replace Path.join with urljoin for url paths.•••* gn2/wqflask/edit.py: Import urljoin.
(metadata_edit): Replace Path with urljoin.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Make GN3_LOCAL_URL local to avoid circular imports.•••* gn2/wqflask/edit.py: Move GN3_LOCAL_URL ...
(metadata_edit): ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Add function for saving metadata in git.•••* gn2/wqflask/edit.py (save_dataset_metadata): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2024-03-26 | Integrate CKEditor into metadata editing.•••* gn2/wqflask/__init__.py: Register blueprint endpoint for metadata
edits.
* gn2/wqflask/edit.py (metadata_edit): New function.
(save): Ditto.
* gn2/wqflask/templates/metadata/dataset.html: New template.
* gn2/wqflask/templates/metadata/editor.html: New template.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |