new(admin.gbapp): Publish dialog.
This commit is contained in:
parent
d0c04ed676
commit
b741fb6bb5
6 changed files with 25 additions and 17 deletions
|
@ -66,7 +66,7 @@
|
||||||
"botbuilder-ai": "4.7.0",
|
"botbuilder-ai": "4.7.0",
|
||||||
"botbuilder-dialogs": "4.7.0",
|
"botbuilder-dialogs": "4.7.0",
|
||||||
"botframework-connector": "4.7.0",
|
"botframework-connector": "4.7.0",
|
||||||
"botlib": "1.5.2",
|
"botlib": "1.5.3",
|
||||||
"cli-spinner": "0.2.10",
|
"cli-spinner": "0.2.10",
|
||||||
"dotenv-extended": "2.7.1",
|
"dotenv-extended": "2.7.1",
|
||||||
"exceljs": "3.5.0",
|
"exceljs": "3.5.0",
|
||||||
|
|
|
@ -179,7 +179,11 @@ export class AdminDialog extends IGBDialog {
|
||||||
|
|
||||||
let from = step.context.activity.from.id;
|
let from = step.context.activity.from.id;
|
||||||
|
|
||||||
if (AdminDialog.canSendBroadcast(from)) {
|
let canPublish = process.env.SECURITY_CAN_PUBLISH?
|
||||||
|
AdminDialog.canSendBroadcast(from):
|
||||||
|
true; // TODO: Disable all can publish from web.
|
||||||
|
|
||||||
|
if (canPublish) {
|
||||||
|
|
||||||
const botId = min.instance.botId;
|
const botId = min.instance.botId;
|
||||||
const locale = step.context.activity.locale;
|
const locale = step.context.activity.locale;
|
||||||
|
@ -227,8 +231,7 @@ export class AdminDialog extends IGBDialog {
|
||||||
if (!step.activeDialog.state.options.confirm) {
|
if (!step.activeDialog.state.options.confirm) {
|
||||||
return await step.replaceDialog('/ask', { isReturning: true });
|
return await step.replaceDialog('/ask', { isReturning: true });
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return await step.endDialog();
|
return await step.endDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,11 @@ export const Messages = {
|
||||||
enter_authenticator_authority_host_url: 'Enter the Authority Host URL (eg.: https://login.microsoftonline.com): ',
|
enter_authenticator_authority_host_url: 'Enter the Authority Host URL (eg.: https://login.microsoftonline.com): ',
|
||||||
enter_authenticator_client_id: `Enter the Client Id GUID: Get from
|
enter_authenticator_client_id: `Enter the Client Id GUID: Get from
|
||||||
[this url](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview)`,
|
[this url](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview)`,
|
||||||
enter_authenticator_client_secret: 'Enter the Client Secret:'
|
enter_authenticator_client_secret: 'Enter the Client Secret:',
|
||||||
|
publish_must_be_admin: 'Seu telefone precisa estar com privilégios administrativos para realizar publicação.',
|
||||||
|
publish_success: 'Publicação realizada.',
|
||||||
|
publish_type_yes: 'Por favor, digite *Sim* para continuar com a publicação.',
|
||||||
|
publish_canceled: 'Publicação cancelada.',
|
||||||
},
|
},
|
||||||
'pt-BR': {
|
'pt-BR': {
|
||||||
authenticate: 'Please, authenticate:',
|
authenticate: 'Please, authenticate:',
|
||||||
|
@ -39,6 +43,10 @@ export const Messages = {
|
||||||
enter_authenticator_authority_host_url: 'Enter the Authority Host URL (eg.: https://login.microsoftonline.com): ',
|
enter_authenticator_authority_host_url: 'Enter the Authority Host URL (eg.: https://login.microsoftonline.com): ',
|
||||||
enter_authenticator_client_id: `Enter the Client Id GUID: Get from
|
enter_authenticator_client_id: `Enter the Client Id GUID: Get from
|
||||||
[this url](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview)`,
|
[this url](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview)`,
|
||||||
enter_authenticator_client_secret: 'Enter the Client Secret:'
|
enter_authenticator_client_secret: 'Enter the Client Secret:',
|
||||||
|
publish_must_be_admin: 'Seu telefone precisa estar com privilégios administrativos para realizar publicação.',
|
||||||
|
publish_success: 'Publicação realizada.',
|
||||||
|
publish_type_yes: 'Por favor, digite *Sim* para continuar com a publicação.',
|
||||||
|
publish_canceled: 'Publicação cancelada.',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"enabledAdmin": "true",
|
"enabledAdmin": "true",
|
||||||
"searchScore": ".15",
|
"searchScore": ".45",
|
||||||
"nlpScore": ".40",
|
"nlpScore": ".80",
|
||||||
"nlpVsSearch": ".4",
|
"nlpVsSearch": ".4",
|
||||||
"autoPackageSync": "gbdialog, gbot, gbtheme"
|
"autoPackageSync": "gbdialog, gbot, gbtheme"
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,8 +245,11 @@ export class GBMinService {
|
||||||
// Serves individual URL for each bot user interface.
|
// Serves individual URL for each bot user interface.
|
||||||
if (process.env.DISABLE_WEB !== 'true') {
|
if (process.env.DISABLE_WEB !== 'true') {
|
||||||
const uiUrl = `/${instance.botId}`;
|
const uiUrl = `/${instance.botId}`;
|
||||||
|
const uiUrlAlt = `/${instance.activationCode}`;
|
||||||
GBServer.globals.server.use(uiUrl, express.static(urlJoin(GBDeployer.deployFolder, GBMinService.uiPackage, 'build')));
|
GBServer.globals.server.use(uiUrl, express.static(urlJoin(GBDeployer.deployFolder, GBMinService.uiPackage, 'build')));
|
||||||
GBLog.info(`Bot UI ${GBMinService.uiPackage} accessible at: ${uiUrl}.`);
|
GBServer.globals.server.use(uiUrlAlt, express.static(urlJoin(GBDeployer.deployFolder, GBMinService.uiPackage, 'build')));
|
||||||
|
|
||||||
|
GBLog.info(`Bot UI ${GBMinService.uiPackage} accessible at: ${uiUrl} and ${uiUrlAlt}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clients get redirected here in order to create an OAuth authorize url and redirect them to AAD.
|
// Clients get redirected here in order to create an OAuth authorize url and redirect them to AAD.
|
||||||
|
|
|
@ -12,10 +12,7 @@ export const Messages = {
|
||||||
whats_email: "What's your E-mail address?",
|
whats_email: "What's your E-mail address?",
|
||||||
validation_enter_valid_email: "Please enter a valid e-mail." ,
|
validation_enter_valid_email: "Please enter a valid e-mail." ,
|
||||||
affirmative_sentences: /^(sim|s|positivo|afirmativo|claro|evidente|sem dúvida|confirmo|confirmar|confirmado|uhum)/i,
|
affirmative_sentences: /^(sim|s|positivo|afirmativo|claro|evidente|sem dúvida|confirmo|confirmar|confirmado|uhum)/i,
|
||||||
publish_must_be_admin: 'Seu telefone precisa estar com privilégios administrativos para realizar publicação.',
|
|
||||||
publish_success: 'Publicação realizada.',
|
|
||||||
publish_type_yes: 'Por favor, digite *Sim* para continuar com a publicação.',
|
|
||||||
publish_canceled: 'Publicação cancelada.',
|
|
||||||
},
|
},
|
||||||
'pt-BR': {
|
'pt-BR': {
|
||||||
show_video: 'Vou te mostrar um vídeo. Por favor, aguarde...',
|
show_video: 'Vou te mostrar um vídeo. Por favor, aguarde...',
|
||||||
|
@ -28,9 +25,6 @@ export const Messages = {
|
||||||
whats_email: "Qual seu e-mail?",
|
whats_email: "Qual seu e-mail?",
|
||||||
validation_enter_valid_email: "Por favor digite um email válido.",
|
validation_enter_valid_email: "Por favor digite um email válido.",
|
||||||
affirmative_sentences: /^(sim|s|positivo|afirmativo|claro|evidente|sem dúvida|confirmo|confirmar|confirmado|uhum)/i,
|
affirmative_sentences: /^(sim|s|positivo|afirmativo|claro|evidente|sem dúvida|confirmo|confirmar|confirmado|uhum)/i,
|
||||||
publish_must_be_admin: 'Seu telefone precisa estar com privilégios administrativos para realizar publicação.',
|
|
||||||
publish_success: 'Publicação realizada.',
|
|
||||||
publish_type_yes: 'Por favor, digite *Sim* para continuar com a publicação.',
|
|
||||||
publish_canceled: 'Publicação cancelada.',
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue