Merge pull request #5228 from matrix-org/t3chguy/15187
UI Feature Flag: 3PIDs
This commit is contained in:
commit
ee4a5b2208
3 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -26,5 +26,6 @@ export enum UIFeature {
|
|||
ShareQRCode = "UIFeature.shareQrCode",
|
||||
ShareSocial = "UIFeature.shareSocial",
|
||||
IdentityServer = "UIFeature.identityServer",
|
||||
ThirdPartyID = "UIFeature.thirdPartyId",
|
||||
Flair = "UIFeature.flair",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue