feat: GroupSync extension UI (#91777)

* feat: supporting code for groupsync extension UI

* Add result of running i18n extraction

* Place the UI behind a feature toggle as well as the license feature

* Also add access checks to route loading of groupsync route with feature toggle

* Add access check on permissions to show External group sync in nav

* fix: New version of multiOrgRoleOptions hook

* Remove OSS route definition

* Apply feedback on nav title
This commit is contained in:
Aaron Godin
2024-09-19 14:58:11 -05:00
committed by GitHub
parent 534bfba7e3
commit 735332570f
7 changed files with 79 additions and 8 deletions
+15
View File
@@ -154,6 +154,21 @@ func (s *ServiceImpl) getAdminNode(c *contextmodel.ReqContext) (*navtree.NavLink
})
}
if s.license.FeatureEnabled("groupsync") &&
s.features.IsEnabled(ctx, featuremgmt.FlagGroupAttributeSync) &&
hasAccess(ac.EvalAny(
ac.EvalPermission("groupsync.mappings:read"),
ac.EvalPermission("groupsync.mappings:write"),
)) {
accessNodeLinks = append(accessNodeLinks, &navtree.NavLink{
Text: "External group sync",
Id: "groupsync",
SubTitle: "Manage mappings of Identity Provider groups to Grafana Roles",
Icon: "",
Url: s.cfg.AppSubURL + "/admin/access/groupsync",
})
}
usersNode := &navtree.NavLink{
Text: "Users and access",
SubTitle: "Configure access for individual users, teams, and service accounts",