From ca335bd60677be498b92461625cd410df4b5e09c Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 7 Mar 2019 16:40:07 +0000 Subject: [PATCH] hide AOS when in trashcan --- projects/adf-office-services-ext/src/lib/evaluators.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/adf-office-services-ext/src/lib/evaluators.ts b/projects/adf-office-services-ext/src/lib/evaluators.ts index ade0db3b0..20cfe649c 100644 --- a/projects/adf-office-services-ext/src/lib/evaluators.ts +++ b/projects/adf-office-services-ext/src/lib/evaluators.ts @@ -6,6 +6,11 @@ export function canOpenWithOffice( context: RuleContext, ...args: RuleParameter[] ): boolean { + const { url } = context.navigation; + if (url && url.startsWith('/trashcan')) { + return false; + } + // todo: needs to have typed access via SDK (1.8) const auth: AuthenticationService = (context).auth; if (auth && auth.isOauth()) {