Merge pull request #5228 from matrix-org/t3chguy/15187

UI Feature Flag: 3PIDs
This commit is contained in:
Michael Telatynski 2020-09-18 11:34:52 +01:00 committed by GitHub
commit ee4a5b2208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -248,7 +248,9 @@ export default class GeneralUserSettingsTab extends React.Component {
// validate 3PID ownership even if we're just adding to the homeserver only.
// For newer homeservers with separate 3PID add and bind methods (MSC2290),
// there is no such concern, so we can always show the HS account 3PIDs.
if (this.state.haveIdServer || this.state.serverSupportsSeparateAddAndBind === true) {
if (SettingsStore.getValue(UIFeature.ThirdPartyID) &&
(this.state.haveIdServer || this.state.serverSupportsSeparateAddAndBind === true)
) {
const emails = this.state.loading3pids
? <Spinner />
: <EmailAddresses

View file

@ -649,6 +649,12 @@ export const SETTINGS: {[setting: string]: ISetting} = {
[UIFeature.IdentityServer]: {
supportedLevels: LEVELS_UI_FEATURE,
default: true,
// Identity Server (Discovery) Settings make no sense if 3PIDs in general are hidden
controller: new UIFeatureController(UIFeature.ThirdPartyID),
},
[UIFeature.ThirdPartyID]: {
supportedLevels: LEVELS_UI_FEATURE,
default: true,
},
[UIFeature.Flair]: {
supportedLevels: LEVELS_UI_FEATURE,

View file

@ -26,5 +26,6 @@ export enum UIFeature {
ShareQRCode = "UIFeature.shareQrCode",
ShareSocial = "UIFeature.shareSocial",
IdentityServer = "UIFeature.identityServer",
ThirdPartyID = "UIFeature.thirdPartyId",
Flair = "UIFeature.flair",
}