How to use the enabled.login.accounts function in enabled

To help you get started, we’ve selected a few enabled 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 saggiyogesh / nodeportal / lib / BootstrapApp.js View on Github external
AppProperties.set("DEV_STATIC_MAX_AGE", props["dev.static.max.age"]);
    AppProperties.set("AVAILABLE_LOCALES", props["available.locales"]);
    AppProperties.set("SCHEMA_LIST_MODEL_EVENTS", props["schema.list.model.events"]);
    AppProperties.set("SERVER_PORT", props["server.port"]);
    AppProperties.set("MAIL_KNOWN_SMTP", props["mail.known.smtp"]);
    AppProperties.set("MAIL_HOST", props["mail.host"]);
    AppProperties.set("MAIL_PORT", props["mail.port"]);
    AppProperties.set("MAIL_AUTH_USER", props["mail.auth.user"]);
    AppProperties.set("MAIL_AUTH_PASSWORD", props["mail.auth.password"]);
    AppProperties.set("STARTUP_MAIL_TEST", props["startup.mail.test"]);

    AppProperties.set("APP_STARTUP_ACTIONS_FILE", props["app.startup.actions.file"]);
    AppProperties.set("REQ_MIDDLEWARES", props["req.middlewares"]);

    //OAuth accounts login config
    var accounts = props["enabled.login.accounts"];
    accounts = accounts || AppProperties.get("ENABLED_LOGIN_ACCOUNTS");
    if (accounts) {
        AppProperties.set("ENABLED_LOGIN_ACCOUNTS", accounts);
        accounts = accounts.split(",");
        var accConfig = {};
        _.each(props, function (value, key) {
            var split = key.split(".");
            var acc = split[0];
            if (acc && _.contains(accounts, acc)) {
                accConfig[acc] = accConfig[acc] || {};
                //trying to convert string array into array
                try {
                    value = eval(value);
                }
                catch (e) {
                }

enabled

Check if a certain debug flag is enabled.

MIT
Latest version published 6 years ago

Package Health Score

65 / 100
Full package analysis

Popular enabled functions