Revert "Anonymous: Enforce org role Viewer setting (#102070)" (#103043)

This reverts commit e216c2f29d.
This commit is contained in:
Eric Leijonmarck
2025-03-31 10:31:53 +01:00
committed by GitHub
parent ae0bcbd006
commit 180f579f18
8 changed files with 35 additions and 5 deletions
@@ -31,6 +31,7 @@ func TestAnonymous_Authenticate(t *testing.T) {
org: &org.Org{ID: 1, Name: "some org"},
cfg: &setting.Cfg{
Anonymous: setting.AnonymousSettings{
OrgRole: "Viewer",
OrgName: "some org",
},
},
@@ -40,6 +41,7 @@ func TestAnonymous_Authenticate(t *testing.T) {
err: fmt.Errorf("some error"),
cfg: &setting.Cfg{
Anonymous: setting.AnonymousSettings{
OrgRole: "Viewer",
OrgName: "some org",
},
},
@@ -65,6 +67,7 @@ func TestAnonymous_Authenticate(t *testing.T) {
assert.Equal(t, "anonymous:0", user.GetID())
assert.Equal(t, tt.org.ID, user.OrgID)
assert.Equal(t, tt.org.Name, user.OrgName)
assert.Equal(t, tt.cfg.Anonymous.OrgRole, string(user.GetOrgRole()))
}
})
}