-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature flag to restrict access to the inventory report button to…
… sysadmins. (PP-1329) (#115) * Add feature flags to context. * Use `reportsOnlyForSysadmins` to control access to inventory reports.
- Loading branch information
Showing
14 changed files
with
140 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,11 @@ import { | |
const AllProviders = ({ children }) => { | ||
const queryClient = new QueryClient(); | ||
return ( | ||
<ContextProvider csrfToken={""} email={"[email protected]"}> | ||
<ContextProvider | ||
csrfToken={""} | ||
featureFlags={{}} | ||
email={"[email protected]"} | ||
> | ||
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider> | ||
</ContextProvider> | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,11 @@ describe("Stats", () => { | |
const AllProviders = ({ children, store }) => { | ||
return ( | ||
<Provider store={store ?? mockStore(statsState({}))}> | ||
<ContextProvider csrfToken={""} email={"[email protected]"}> | ||
<ContextProvider | ||
csrfToken={""} | ||
featureFlags={{}} | ||
email={"[email protected]"} | ||
> | ||
<QueryClientProvider client={new QueryClient()}> | ||
{children} | ||
</QueryClientProvider> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { FeatureFlags } from "../interfaces"; | ||
|
||
/** | ||
* Default values for our feature flags. | ||
*/ | ||
export const defaultFeatureFlags: FeatureFlags = { | ||
enableAutoList: true, | ||
reportsOnlyForSysadmins: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters