How to use the mattermost-redux/selectors/entities/general.getLicense function in mattermost-redux

To help you get started, we’ve selected a few mattermost-redux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mattermost / mattermost-webapp / components / signup / signup_controller / index.js View on Github external
function mapStateToProps(state, ownProps) {
    const license = getLicense(state);
    const config = getConfig(state);

    const isLicensed = license && license.IsLicensed === 'true';
    const enableOpenServer = config.EnableOpenServer === 'true';
    const noAccounts = config.NoAccounts === 'true';
    const enableSignUpWithEmail = config.EnableSignUpWithEmail === 'true';
    const enableSignUpWithGitLab = config.EnableSignUpWithGitLab === 'true';
    const enableSignUpWithGoogle = config.EnableSignUpWithGoogle === 'true';
    const enableSignUpWithOffice365 = config.EnableSignUpWithOffice365 === 'true';
    const enableLDAP = config.EnableLdap === 'true';
    const enableSAML = config.EnableSaml === 'true';
    const samlLoginButtonText = config.SamlLoginButtonText;
    const ldapLoginFieldName = config.LdapLoginFieldName;
    const siteName = config.SiteName;

    let usedBefore;
github mattermost / mattermost-webapp / components / tutorial / index.jsx View on Github external
function mapStateToProps(state) {
    const license = getLicense(state);
    const config = getConfig(state);

    const team = getCurrentTeam(state);

    const teamChannels = getChannelsNameMapInCurrentTeam(state);
    const townSquare = teamChannels[Constants.DEFAULT_CHANNEL];
    const townSquareDisplayName = townSquare ? townSquare.display_name : Constants.DEFAULT_CHANNEL_UI_NAME;

    const appDownloadLink = config.AppDownloadLink;
    const isLicensed = license.IsLicensed === 'true';
    const restrictTeamInvite = !haveITeamPermission(state, {team: team.id, permission: Permissions.INVITE_USER});
    const supportEmail = config.SupportEmail;

    return {
        townSquareDisplayName,
        appDownloadLink,
github mattermost / mattermost-mobile / app / components / announcement_banner / index.js View on Github external
function mapStateToProps(state) {
    const config = getConfig(state);
    const license = getLicense(state);
    const {announcement} = state.views;

    return {
        bannerColor: config.BannerColor,
        bannerDismissed: config.BannerText === announcement,
        bannerEnabled: config.EnableBanner === 'true' && license.IsLicensed === 'true',
        bannerText: config.BannerText,
        bannerTextColor: config.BannerTextColor || '#000',
        theme: getTheme(state),
        isLandscape: isLandscape(state),
    };
}
github mattermost / mattermost-webapp / components / about_build_modal / index.js View on Github external
function mapStateToProps(state) {
    const modalId = ModalIdentifiers.ABOUT;
    return {
        config: getConfig(state),
        license: getLicense(state),
        show: isModalOpen(state, modalId),
    };
}
github mattermost / mattermost-webapp / components / needs_team / index.js View on Github external
function mapStateToProps(state, ownProps) {
    const license = getLicense(state);
    const config = getConfig(state);
    const currentUser = getCurrentUser(state);

    return {
        theme: getTheme(state),
        mfaRequired: checkIfMFARequired(currentUser, license, config, ownProps.match.url),
        currentUser,
        currentTeamId: getCurrentTeamId(state),
        teamsList: getMyTeams(state),
        currentChannelId: getCurrentChannelId(state),
    };
}
github mattermost / mattermost-webapp / utils / license_utils.jsx View on Github external
export function isLicenseExpiring() {
    const license = getLicense(store.getState());
    if (license.IsLicensed !== 'true') {
        return false;
    }

    const timeDiff = parseInt(license.ExpiresAt, 10) - Date.now();
    return timeDiff <= LICENSE_EXPIRY_NOTIFICATION;
}
github mattermost / mattermost-webapp / components / admin_console / permission_schemes_settings / permission_system_scheme_settings / index.jsx View on Github external
function mapStateToProps(state) {
    return {
        config: getConfig(state),
        license: getLicense(state),
        roles: getRoles(state),
        rolesRequest: state.requests.roles.getRolesByNames,
    };
}
github mattermost / mattermost-webapp / components / login / login_controller / index.js View on Github external
function mapStateToProps(state) {
    const config = getConfig(state);
    const license = getLicense(state);

    const isLicensed = license.IsLicensed === 'true';

    const customBrandText = config.CustomBrandText;
    const customDescriptionText = config.CustomDescriptionText;
    const enableCustomBrand = config.EnableCustomBrand === 'true';
    const enableLdap = config.EnableLdap === 'true';
    const enableOpenServer = config.EnableOpenServer === 'true';
    const enableSaml = config.EnableSaml === 'true';
    const enableSignInWithEmail = config.EnableSignInWithEmail === 'true';
    const enableSignInWithUsername = config.EnableSignInWithUsername === 'true';
    const enableSignUpWithEmail = config.EnableSignUpWithEmail === 'true';
    const enableSignUpWithGitLab = config.EnableSignUpWithGitLab === 'true';
    const enableSignUpWithGoogle = config.EnableSignUpWithGoogle === 'true';
    const enableSignUpWithOffice365 = config.EnableSignUpWithOffice365 === 'true';
    const ldapLoginFieldName = config.LdapLoginFieldName;
github mattermost / mattermost-webapp / components / analytics / system_analytics / index.js View on Github external
function mapStateToProps(state) {
    const license = getLicense(state);
    const isLicensed = license.IsLicensed === 'true';

    return {
        isLicensed,
        stats: state.entities.admin.analytics,
    };
}
github mattermost / mattermost-webapp / components / logged_in / index.js View on Github external
function mapStateToProps(state, ownProps) {
    const license = getLicense(state);
    const config = getConfig(state);
    const showTermsOfService = shouldShowTermsOfService(state);

    return {
        currentUser: getCurrentUser(state),
        currentChannelId: getCurrentChannelId(state),
        mfaRequired: checkIfMFARequired(getCurrentUser(state), license, config, ownProps.match.url),
        enableTimezone: config.ExperimentalTimezone === 'true',
        showTermsOfService,
    };
}