Adding FGAC annotations validation for creation and deletion (#46736)

Access Control: Adding FGAC annotations validation for creation and deletion
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Ezequiel Victorero
2022-03-21 14:28:39 -03:00
committed by GitHub
parent 7ab1ef8d6e
commit c717320942
13 changed files with 377 additions and 111 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ func TestAnnotations(t *testing.T) {
assert.Equal(t, int64(20), annotation2.Epoch)
assert.Equal(t, int64(21), annotation2.EpochEnd)
globalAnnotation1 := &annotations.Item{
organizationAnnotation1 := &annotations.Item{
OrgId: 1,
UserId: 1,
Text: "deploy",
@@ -64,9 +64,9 @@ func TestAnnotations(t *testing.T) {
Epoch: 15,
Tags: []string{"deploy"},
}
err = repo.Save(globalAnnotation1)
err = repo.Save(organizationAnnotation1)
require.NoError(t, err)
assert.Greater(t, globalAnnotation1.Id, int64(0))
assert.Greater(t, organizationAnnotation1.Id, int64(0))
globalAnnotation2 := &annotations.Item{
OrgId: 1,