Skip to content

quick fix: list calendar for users without groups access #607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

tybalex
Copy link
Contributor

@tybalex tybalex commented Apr 23, 2025

obot-platform/obot#2694
personal accounts have no access to groups feature.

for _, group := range memberOf.GetValue() {
result, err := client.Groups().ByGroupId(util.Deref(group.GetId())).Calendar().Get(ctx, nil)
if err != nil {
// Some groups don't have calendars and will just error out. That's fine.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm what is the actual fix? look like the code will do the same behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except the logic here:

if err != nil {
		return nil, fmt.Errorf("failed to get group memberships: %w", err)
	}

Personal accounts do not have access to group features, so this should not be treated as an error.

@tybalex tybalex merged commit 3bab814 into obot-platform:main Apr 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants