* Add email to the users api if display_public_email_on_profile is set to true
* Fixed selected user fields in the api
* A separate partial for user data with email (for the api)
* Refactor API user suspend, make room for more roles
* Handle adding limited
* Handle remove limited
* And swagger docs
* Update & refactor roles spec
* Remove old route
* Remove old specs
* Moved a comment about soft delete from controller to the service
* Create a note when unpublishing all users' articles via api
* Create a note with the default text when unpublishing all via api, added docs
* Moved logging and deleting comments to Moderator::UnpublishAllArticlesWorker
* Added logging for admin action (unpublish_all_articles)
* Extracted code from UnpublishAllArticlesWorker to the service
* Make it possible to add a note while unpublishing all via admin action
* Added ability to add notes for unpublishing all from moderator action panel
* Fixed setting slug for the AuditLog on unpublishing + spec
* Add missing action of comment deletion in unpublish api
* reorganize controller action + inline comments
* Improve spec to check for AuditLog integrity
* First commit for audit log - specs need fixing
* Fix notification subscription issues + specs
* Use single line in notification subscribe initializer
* Remove conditional in unpublish endpoint
* New suspend user API endpoint
* Restrict admin access only to suspend action
* Add suspended? check on new endpoint spec
* Replace POST with PUT action
* Replace redundant response payload with empty 200 response
* Rely on user_policy instead of before_action method
* Use alias with matching method name instead of unpublish
* Use already existing toggle_suspension_status? method in policy
* Remove manual creation of note
* Update suspend success spec
* unpublish comments+articles by user id in API v1
* Update spec/requests/api/v1/users_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Rely on user_policy instead of before_action method
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>