mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Hide enroll secret for team observer; align button (#1935)
This commit is contained in:
parent
99e9e846f4
commit
a64023a5af
2 changed files with 5 additions and 2 deletions
|
|
@ -1381,7 +1381,7 @@ const mapStateToProps = (state, ownProps) => {
|
|||
const teams = memoizedGetEntity(state.entities.teams.data);
|
||||
|
||||
// If there is no team_id, set selectedTeam to 0 so dropdown defaults to "All teams"
|
||||
const selectedTeam = location.query?.team_id || 0;
|
||||
const selectedTeam = parseInt(location.query?.team_id, 10) || 0;
|
||||
|
||||
const currentUser = state.auth.user;
|
||||
const canAddNewHosts =
|
||||
|
|
@ -1391,7 +1391,8 @@ const mapStateToProps = (state, ownProps) => {
|
|||
const canEnrollHosts =
|
||||
permissionUtils.isGlobalAdmin(currentUser) ||
|
||||
permissionUtils.isGlobalMaintainer(currentUser) ||
|
||||
(permissionUtils.isAnyTeamMaintainer(currentUser) && selectedTeam !== 0);
|
||||
(selectedTeam !== 0 &&
|
||||
permissionUtils.isTeamMaintainer(currentUser, selectedTeam));
|
||||
const canAddNewLabels =
|
||||
permissionUtils.isGlobalAdmin(currentUser) ||
|
||||
permissionUtils.isGlobalMaintainer(currentUser);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
margin-bottom: $pad-medium;
|
||||
|
||||
.button-wrap {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
min-width: 266px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue