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

Deletion of tags: permission is not checked in the backend #1915

Open
1 task done
ebroda opened this issue Dec 4, 2024 · 0 comments
Open
1 task done

Deletion of tags: permission is not checked in the backend #1915

ebroda opened this issue Dec 4, 2024 · 0 comments
Labels

Comments

@ebroda
Copy link
Contributor

ebroda commented Dec 4, 2024

Description of the issue

Currently, there is no check in the backend if a user is admin & allowed to delete tags.

So, if you manipulate the DOM and simply add the delete button, you can delete tags even without being an admin.

https://github.com/OpenEnergyPlatform/oeplatform/blob/develop/dataedit/templates/dataedit/tag_editor.html

Ideas of solution

Add check if user is admin before executing the deletion, somewhere here:

elif "submit_delete" in request.POST:
id = request.POST["tag_id"]
delete_tag(id)

Context and Environment

  • Version used: 1.0.5
  • Operating system: -
  • Environment setup and (python) version: -

Workflow checklist

@ebroda ebroda added the bug label Dec 4, 2024
@ebroda ebroda changed the title Deleting of tags is not checked in the backend Deleting of tags: permission is not checked in the backend Dec 4, 2024
@ebroda ebroda changed the title Deleting of tags: permission is not checked in the backend Deletion of tags: permission is not checked in the backend Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant