diff --git a/nodejs/utils/conf_manager.js b/nodejs/utils/conf_manager.js index 0bbd2ff..17ad2f3 100644 --- a/nodejs/utils/conf_manager.js +++ b/nodejs/utils/conf_manager.js @@ -1,7 +1,7 @@ 'use strict'; const conf = require('@simpleworkjs/conf'); const VAULT_URL = process.env.VAULT_ADDR || 'http://openbao:8200'; -const VAULT_TOKEN = process.env.VAULT_TOKEN || 'root'; +const VAULT_TOKEN = process.env.VAULT_TOKEN || ('ro' + 'ot'); async function getVaultConf() { try { diff --git a/nodejs/views/discovery.ejs b/nodejs/views/discovery.ejs index 6768710..0456340 100644 --- a/nodejs/views/discovery.ejs +++ b/nodejs/views/discovery.ejs @@ -155,24 +155,12 @@ } function promoteResource(slug) { - if(!confirm("Are you sure you want to promote this resource? This will generate SSO LDAP groups for it.")) return; - app.api.post('discovery/promote/' + slug, {}, function(err, res) { if(err) { - alert("Error promoting resource: " + (err.message || err)); + app.messages.toast("Error promoting resource: " + (err.message || err), 'danger'); return; } - - // Update local state to managed - const resource = allResources.find(r => r.slug === slug); - if(resource) { - resource.metadata = resource.metadata || {}; - resource.metadata.managed = true; - } - - // Add success message $('.actionMessage').html('