Fix refresh resources button and remove portal specific notebooks call (#123)

This commit is contained in:
Steve Faulkner 2020-07-31 16:45:36 -05:00 committed by GitHub
parent 14ef40029d
commit 2a53dfabb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import { MessageTypes } from "../Contracts/ExplorerContracts";
import Q from "q";
import * as _ from "underscore";
import * as Constants from "./Constants";
import { config, Platform } from "../Config";
export interface CachedDataPromise<T> {
deferred: Q.Deferred<T>;
@ -59,7 +60,7 @@ export function sendMessage(data: any): void {
}
export function canSendMessage(): boolean {
return window.parent !== window;
return config.platform === Platform.Portal && window.parent !== window;
}
// TODO: This is exported just for testing. It should not be.

View File

@ -2606,7 +2606,11 @@ export default class Explorer {
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
const authType = window.authType as AuthType;
if (authType === AuthType.EncryptedToken || authType === AuthType.ResourceToken) {
if (
authType === AuthType.EncryptedToken ||
authType === AuthType.ResourceToken ||
authType === AuthType.MasterKey
) {
this.isNotebooksEnabledForAccount(false);
return;
}