Skip to content

added if-clause to let only orga be able to delete accounts and not ambassadors

Caluera requested to merge caluera-only-orga-can-delete-user into master

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.

  1. Checkout branch locally
  2. Login as ambassador
  3. Go to profile of user in the region
  4. Go to edit profile
  5. See if there is no button to delete the profile
  6. 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

Merge request reports