Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix opening non default workspace in webapp #322

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions airbyte-webapp/src/core/utils/rbac/rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useListPermissions } from "core/api";
import { useCurrentUser } from "core/services/auth";

import { RbacQuery, RbacQueryWithoutResourceId, useRbacPermissionsQuery } from "./rbacPermissionsQuery";
import { isCloudApp } from "../app";

/**
* Takes a list of permissions and a full or partial query, returning a boolean representing if the user has any permissions satisfying the query
Expand All @@ -19,7 +18,7 @@ export const useRbac = (query: RbacQuery | RbacQueryWithoutResourceId) => {
// invariant check
if ((!queryUsesResourceId && resourceId) || (queryUsesResourceId && !resourceId)) {
// TODO: This is a patch to handle the fact that workspaces on cloud do not have an organization.
if (resourceType === "ORGANIZATION" && isCloudApp()) {
if (resourceType === "ORGANIZATION") {
console.debug("Ignore missing organization id in useRbac.");
} else {
// this will throw if there is a missing workspace id OR a resourceId is passed to an instance query
Expand Down
Loading