From 979d0ca70f5aec638ce6e6bb8c8f69f47973f221 Mon Sep 17 00:00:00 2001 From: Garrett Bjerkhoel Date: Tue, 28 Apr 2015 20:21:44 -0700 Subject: [PATCH] Add new error type for team membership permissions --- pkg/social/social.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/social/social.go b/pkg/social/social.go index c19784e34e1..752ed7114c2 100644 --- a/pkg/social/social.go +++ b/pkg/social/social.go @@ -5,6 +5,7 @@ import ( "fmt" "strconv" "strings" + "errors" "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" @@ -109,6 +110,10 @@ type SocialGithub struct { teamIds []int } +var ( + ErrMissingTeamMembership = errors.New("User not a member of one of the required teams") +) + func (s *SocialGithub) Type() int { return int(models.GITHUB) }