added if-clause to let only orga be able to delete accounts and not ambassadors
Closes None
What does this MR do?
It adds a check whether the current user is an orga user or an ambassador and gives only the orga user the possibility to delete an account.
How confident are you it won't break things if deployed?
Pretty sure, it is only a small change and works locally.
Links to related issues
Any relevant links (issues, documentation, slack discussions).
How to test
Steps a reviewer can take to verify that this MR does what it says it does e.g.
- Checkout branch locally
- Login as ambassador
- Go to profile of user in the region
- Go to edit profile
- See if there is no button to delete the profile
- Do the same as orga and see if the button is now there.
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s)) -
Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Caluera