diff --git a/docs/content/doc/setup/openid.md b/docs/content/doc/setup/openid.md index 8a55697db..d9118f93f 100644 --- a/docs/content/doc/setup/openid.md +++ b/docs/content/doc/setup/openid.md @@ -57,20 +57,20 @@ You should see "(sso: *your_oidcID*)" written next to each team you were asigned *All examples assume one team called "team 1"* -1. *Token delivers team.name +team.oidc_id and Vikunja team does not exist:* \ -New team will be created called "team 1" with attribute oidcId: "33929" +1. *Token delivers team.name +team.oidcID and Vikunja team does not exist:* \ +New team will be created called "team 1" with attribute oidcID: "33929" 2. *In Vikunja Team with name "team 1" already exists in vikunja, but has no oidcID set:* \ -new team will be created called "team 1" with attribute oidc_id: "33929" +new team will be created called "team 1" with attribute oidcID: "33929" 3. *In Vikunja Team with name "team 1" already exists in vikunja, but has different oidcID set:* \ -new team will be created called "team 1" with attribute oidcId: "33929" +new team will be created called "team 1" with attribute oidcID: "33929" 4. *In Vikunja Team with oidcID "33929" already exists in vikunja, but has different name than "team1":* \ -new team will be created called "team 1" with attribute oidcId: "33929" +new team will be created called "team 1" with attribute oidcID: "33929" 5. *Scope vikunja_scope is not set:* \ diff --git a/pkg/models/teams.go b/pkg/models/teams.go index 7ccbe560a..7a78d7014 100644 --- a/pkg/models/teams.go +++ b/pkg/models/teams.go @@ -136,8 +136,6 @@ func GetTeamByOidcIDAndName(s *xorm.Session, oidcID string, teamName string) (*T has, err := s. Table("teams"). Where("oidc_id = ? AND name = ?", oidcID, teamName). - Asc("id"). - Limit(1). Get(team) if !has || err != nil { return nil, ErrOIDCTeamDoesNotExist{teamName, oidcID}