mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
[unreleased bugs] Fleet UI: Observer+ live query button, Team admin/maintainer save button (#20018)
This commit is contained in:
parent
4dce1f6623
commit
dc0d215880
2 changed files with 9 additions and 4 deletions
|
|
@ -188,7 +188,8 @@ const PolicyForm = ({
|
|||
const hasSavePermissions =
|
||||
!isEditMode || // save a new policy
|
||||
isGlobalAdmin ||
|
||||
isGlobalMaintainer;
|
||||
isGlobalMaintainer ||
|
||||
isTeamMaintainerOrTeamAdmin;
|
||||
|
||||
const onLoad = (editor: IAceEditor) => {
|
||||
editor.setOptions({
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ const ManageQueriesPage = ({
|
|||
const queryParams = location.query;
|
||||
const {
|
||||
isGlobalAdmin,
|
||||
isGlobalMaintainer,
|
||||
isTeamAdmin,
|
||||
isTeamMaintainer,
|
||||
isOnlyObserver,
|
||||
|
|
@ -361,9 +362,12 @@ const ManageQueriesPage = ({
|
|||
};
|
||||
|
||||
// CTA button shows for all roles but global observers and current team's observers
|
||||
const canCustomQuery = isOnGlobalTeam
|
||||
? !isOnlyObserver
|
||||
: isTeamAdmin || isTeamMaintainer || isObserverPlus; // isObserverPlus checks specific team as well
|
||||
const canCustomQuery =
|
||||
isGlobalAdmin ||
|
||||
isGlobalMaintainer ||
|
||||
isTeamAdmin ||
|
||||
isTeamMaintainer ||
|
||||
isObserverPlus; // isObserverPlus checks global and selected team
|
||||
|
||||
return (
|
||||
<MainContent className={baseClass}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue