viehlieb
  • freelance software developer @local-it @pragma-shift @foodsoft

  • Joined on 2022-10-12
viehlieb commented on pull request vikunja/vikunja#1393 2023-03-10 12:49:47 +00:00
feat: assign users to teams via OIDC claims

Please fix the lint and regenerate config docs.

I try to fix lint and it tells me to run 'do-the-swag'. which i do, it runs the commands, etc... but no new swagger file is…

viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-03-10 12:46:35 +00:00
169b668c3c remove left over function GetMemberCount, rename function SignOut to RemoveFrom
viehlieb commented on pull request vikunja/vikunja#1393 2023-03-10 12:30:40 +00:00
feat: assign users to teams via OIDC claims

The rationale was to ensure users can still log in, even though the scope is malformed. Therefore the Errors are logged instead of returning.

Also: It might be some groups with valid token…

viehlieb commented on pull request vikunja/vikunja#1393 2023-03-10 12:19:46 +00:00
feat: assign users to teams via OIDC claims

okay, but won't it reach inconsistent state anyways? Imagine the user is in 3 groups. tm is deleted for group 1 tm is not deleted for group 2, because user is last member tm won't be deleted…

viehlieb commented on pull request vikunja/vikunja#1393 2023-03-10 12:12:11 +00:00
feat: assign users to teams via OIDC claims

I tend to just changing functionality to take the first team with that specific setting.

viehlieb commented on pull request vikunja/vikunja#1393 2023-03-10 12:11:15 +00:00
feat: assign users to teams via OIDC claims

Ups, I guess here is something missing

viehlieb commented on pull request vikunja/vikunja#1393 2023-03-10 12:10:00 +00:00
feat: assign users to teams via OIDC claims

In fact this function is not needed anymore for this feature, so I'll just remove it. It was used for finding out whether a user should be signed out from team or deleted.

viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-02-23 15:33:33 +00:00
b607fea49d change too generic name TeamData struct to OIDCTeamData
viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 15:33:00 +00:00
feat: assign users to teams via OIDC claims

No, the teamData has to be pulled out of token via

getTeamDataFromToken

Called it OIDCTeamData now.

viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-02-23 15:27:44 +00:00
fc89564ebc cast VikujGroups directly to []map[string]interface{}
viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-02-23 15:25:44 +00:00
5bd7451469 lint
viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-02-23 15:24:32 +00:00
a35f83b0a4 changug []models.Team to []*models.Team
viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 15:18:41 +00:00
feat: assign users to teams via OIDC claims

no reason, had claim VikunjaGroups more agnostic to specific data type. now casts directly to []map[string]interface{}

viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-02-23 15:18:09 +00:00
eb5d49d343 cast VikujGroups directly to []map[string]interface{}
viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 14:59:57 +00:00
feat: assign users to teams via OIDC claims

okay, teams won't be deleted

viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 14:58:37 +00:00
feat: assign users to teams via OIDC claims

changed behaviour to not delete team

viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 14:57:17 +00:00
feat: assign users to teams via OIDC claims

changed behaviour to skipping the invalid team

viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 14:54:33 +00:00
feat: assign users to teams via OIDC claims

Intermediate struct which only holds TeamName and OidcId Description. It does not exist as a Team yet or better: it is the data accessible via oidc, which the Team struct is compared against.

viehlieb pushed to 950_reworked_assign_teams_via_oidc at viehlieb/api 2023-02-23 14:52:24 +00:00
183b870c6d add punctuation and comments for errors
584fa51a2a change get to exist in team_members.go:114
Compare 2 commits »
viehlieb commented on pull request vikunja/vikunja#1393 2023-02-23 14:48:53 +00:00
feat: assign users to teams via OIDC claims

done