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

Confirmation on user deletion #7977

Closed
wilcopots opened this issue Aug 5, 2022 · 11 comments
Closed

Confirmation on user deletion #7977

wilcopots opened this issue Aug 5, 2022 · 11 comments
Assignees
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. ux Issues related to user experience.
Milestone

Comments

@wilcopots
Copy link

Describe the problem

On the user detail page (/user/[username]/#edit), on the bottom of the page there is an option to delete the user, via button 'Delete'.
This button is right next to the 'Save' button.

If for any reason you miss-click on 'Save', and thereby click on 'Delete'. The user is deleted immediately and not able to restore.

Describe the solution you'd like

It would be ideally if there is a confirmation page after request for deletion, likewise the same as there is for deleting a component or project. In that case you won't accidentally irreversible delete the user.

Describe alternatives you've considered

No response

Screenshots

Screenshot 2022-08-05 at 15 54 37

Additional context

Using Weblate 4.13.1

@nijel nijel added enhancement Adding or requesting a new feature. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. ux Issues related to user experience. labels Aug 10, 2022
@github-actions
Copy link

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

@shashwatpandeyvns
Copy link

Hi,
I would like contribute to the project. How can start this journey? Please, Enlighten me.

@nijel
Copy link
Member

nijel commented Aug 17, 2022

You're welcome to contribute!

The current delete button is here:

<form method="post">
{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="{% trans "Save" %}" class="btn btn-primary" />
<input type="submit" name="remove_user" value="{% trans "Delete" %}" class="btn btn-danger" />
</form>

It needs to include a confirmation popup like it is done here for removing a user from a project:

<div class="modal fade" tabindex="-1" role="dialog" id="delete_user_{{ user.id }}">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{% trans "Close" %}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{% trans "Are you absolutely sure?" %}</h4>
</div>
<div class="modal-body">
{% blocktrans with user=user.username %}This will remove <b>{{ user }}</b> access to this project.{% endblocktrans %}
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-danger" value="{% trans "Remove" %}" />
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

@shashwatpandeyvns
Copy link

I was trying to install Weblate on wsl for testing purposes, but it failed every time with - ERROR: Could not build wheels for borgbackup which use PEP 517 and cannot be installed directly. Any Idea what's going on here?

@nijel
Copy link
Member

nijel commented Aug 18, 2022

Maybe you're missing some of the system dependencies, please check corresponding distro guide at https://docs.weblate.org/en/latest/admin/install.html

@DiegoCaraballo
Copy link

Hello @nijel how are you?
I would like to contribute.
Can I start with this?
Regards!

@nijel
Copy link
Member

nijel commented Sep 22, 2022

@DiegoCaraballo Yes, contributions are always welcome!

@prakhar1144
Copy link

Hey all,
I have started working on this issue.

@alexjensen2002
Copy link
Contributor

alexjensen2002 commented Oct 2, 2022

Oh, my apologies @prakhar1144 I forgot to say I started working on this earlier. I'm pretty much done with it, though I'm not entirely clear on how or whether I need to do unit tests/etc for this, since it's just an HTML change.

@nijel how would I go about making a pull request and/or getting feedback on if my code is ready to merge?

edit: here is the code that I have right now:
alexjensen2002@526ab31
visual of what happens when you press the delete button now:
image

@alexjensen2002
Copy link
Contributor

Oh, oops, I didn't see the compare across forks button before so I thought that I couldn't make a PR for some reason haha.

I wasn't sure how to do unit tests or squash commits, so for now this is just a draft PR.
I'm using WSL and Docker for my setup, by the way, so if you have any way to help me there that would be appreciated. When I try to use rundev.sh to test it doesn't find any tests, so I assume I'm missing some sort of setup.

@nijel nijel linked a pull request Oct 25, 2022 that will close this issue
5 tasks
@nijel nijel assigned nijel and unassigned alexjensen2002 Dec 13, 2022
@nijel nijel added this to the 4.15 milestone Dec 13, 2022
@nijel nijel closed this as completed in 917e8e0 Dec 13, 2022
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. ux Issues related to user experience.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants