Kaynağa Gözat

add additional scopes

abhishek9686 1 yıl önce
ebeveyn
işleme
5eb87dc327
2 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 1 0
      models/user_mgmt.go
  2. 1 1
      pro/auth/google.go

+ 1 - 0
models/user_mgmt.go

@@ -18,6 +18,7 @@ const (
 	EgressGwRsrcID       RsrcID = "all_egress"
 	NetworkRsrcID        RsrcID = "all_network"
 	EnrollmentKeysRsrcID RsrcID = "all_enrollment_key"
+	UserRsrcID           RsrcID = "all_user"
 )
 
 // Pre-Defined User Roles

+ 1 - 1
pro/auth/google.go

@@ -34,7 +34,7 @@ func initGoogle(redirectURL string, clientID string, clientSecret string) {
 		RedirectURL:  redirectURL,
 		ClientID:     clientID,
 		ClientSecret: clientSecret,
-		Scopes:       []string{"https://www.googleapis.com/auth/userinfo.email"},
+		Scopes:       []string{"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/admin.directory.group.readonly"},
 		Endpoint:     google.Endpoint,
 	}
 }