Access Control: Update Alerting Navbar links builder to use fine-grained access control (#46743)

* remove unnecesarry grants for some alerting roles
* add permissions checks to navigation
This commit is contained in:
Yuriy Tseretyan
2022-03-18 12:58:50 -04:00
committed by GitHub
parent f2450575b3
commit 6967b15e76
2 changed files with 28 additions and 21 deletions

View File

@@ -60,7 +60,6 @@ var (
},
}),
},
Grants: []string{string(models.ROLE_EDITOR)},
}
instancesReaderRole = accesscontrol.RoleRegistration{
@@ -81,7 +80,6 @@ var (
},
},
},
Grants: []string{string(models.ROLE_VIEWER)},
}
instancesEditorRole = accesscontrol.RoleRegistration{
@@ -104,7 +102,6 @@ var (
},
}),
},
Grants: []string{string(models.ROLE_EDITOR)},
}
notificationsReaderRole = accesscontrol.RoleRegistration{
@@ -124,7 +121,6 @@ var (
},
},
},
Grants: []string{string(models.ROLE_VIEWER)},
}
notificationsEditorRole = accesscontrol.RoleRegistration{
@@ -150,7 +146,6 @@ var (
},
}),
},
Grants: []string{string(models.ROLE_EDITOR)},
}
alertingReaderRole = accesscontrol.RoleRegistration{