HomePhabricator
Diffusion Comm 088edd6467cf

[native] [fix] Disable promoting user to admin option if there is no admin role…

Description

[native] [fix] Disable promoting user to admin option if there is no admin role in the thread

Summary:
Linear issue: https://linear.app/comm/issue/ENG-857/admin-sees-an-option-to-promote-user-to-an-admin-even-if-there-is-such
This update introduces additional condition, which disables "Make admin" (and "remove admin") options, when there is no "Admins" role in the thread.

Test Plan:
Log in as admin (to have "change_role" permission) in mobile app. In community threads without admin role, the members menu doesn't contain "Make admin" item.
In "Genesis" thread (which contain "Admins" role, there is still an option to change admin permissions for user (e.g. downgrade Ashoat user role)

Reviewers: palys-swm, ashoat

Reviewed By: palys-swm, ashoat

Subscribers: ashoat, Adrian, atul, karol-bisztyga, benschac

Differential Revision: https://phabricator.ashoat.com/D3459