Skip to content

Commit

Permalink
Address RBAC local storage default setting issue (#1892)
Browse files Browse the repository at this point in the history
* Fix API endpoint for CassandraProxy query API

* activate Mongo Proxy and Cassandra Proxy in Prod

* Add CP Prod endpoint

* Run npm format and tests

* Revert code

* fix bug that blocked local mongo proxy and cassandra proxy development

* Add prod endpoint

* fix pr check tests

* Remove prod

* Remove prod endpoint

* Remove dev endpoint

* Support data plane RBAC

* Support data plane RBAC

* Add additional changes for Portal RBAC functionality

* Address errors and checks

* Cleanup DP RBAC code

* Run format

* Fix unit tests

* Remove unnecessary code

* Run npm format

* Fix enableAadDataPlane feature flag behavior

* Fix  enable AAD dataplane feature flag behavior

* Address feedback comments

* Minor fix

* Add new fixes

* Fix Tables test

* Run npm format

* Address Local storage default setting issue

* Run npm format

* Address lint error

* Run format

---------

Co-authored-by: Asier Isayas <[email protected]>
  • Loading branch information
sindhuba and Asier Isayas authored Jul 1, 2024
1 parent 1021e9c commit dfe79b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hooks/useKnockoutExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ async function configureHostedWithAAD(config: AAD): Promise<Explorer> {
}

updateUserContext({ dataPlaneRbacEnabled });
} else {
const dataPlaneRbacEnabled = account.properties.disableLocalAuth;

updateUserContext({ dataPlaneRbacEnabled });
useDataPlaneRbac.setState({ dataPlaneRbacEnabled: dataPlaneRbacEnabled });
}
} else {
const keys: DatabaseAccountListKeysResult = await listKeys(subscriptionId, resourceGroup, account.name);
Expand Down Expand Up @@ -485,6 +490,11 @@ async function configurePortal(): Promise<Explorer> {
dataPlaneRbacEnabled = isDataPlaneRbacSetting === Constants.RBACOptions.setTrueRBACOption;
}

updateUserContext({ dataPlaneRbacEnabled });
useDataPlaneRbac.setState({ dataPlaneRbacEnabled: dataPlaneRbacEnabled });
} else {
const dataPlaneRbacEnabled = account.properties.disableLocalAuth;

updateUserContext({ dataPlaneRbacEnabled });
useDataPlaneRbac.setState({ dataPlaneRbacEnabled: dataPlaneRbacEnabled });
}
Expand Down

0 comments on commit dfe79b2

Please sign in to comment.