Skip to content
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

provisioning & roles refactor #13

Merged
merged 4 commits into from
Mar 13, 2024
Merged

Conversation

jakcinmarina
Copy link
Contributor

added support for provisioning of roles:

  • admin
  • owner
  • regular user (on revoke this is set, removing all roles and making user regular)

Changed how roles are granted, no longer on user resource, but on workspace resource since the roles are per resource.

@jakcinmarina jakcinmarina requested a review from ggreer March 7, 2024 14:26
Copy link
Contributor

@ggreer ggreer left a comment

Choose a reason for hiding this comment

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

I noticed a couple of things but they were already in the code so... 🤷

return fmt.Errorf("invalid role type: %s", role)
}

userGroupsUrl, err := url.JoinPath(baseUrl + "admin.users." + action)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want a comma instead of a +

Suggested change
userGroupsUrl, err := url.JoinPath(baseUrl + "admin.users." + action)
userGroupsUrl, err := url.JoinPath(baseUrl, "admin.users." + action)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will merge this but the fix will be in the PR for SCIM api. I really don't know why i put + here :D

@@ -113,14 +113,14 @@ func (c *Client) GetUsers(ctx context.Context, teamID, cursor string) ([]UserAdm
values.Add("cursor", cursor)
}

usersUrl, err := url.JoinPath(baseUrl + "admin.users.list")
usersUrl, err := url.JoinPath(baseUrl + "users.list")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
usersUrl, err := url.JoinPath(baseUrl + "users.list")
usersUrl, err := url.JoinPath(baseUrl, "users.list")

@jakcinmarina jakcinmarina merged commit 6ce93e7 into main Mar 13, 2024
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.

2 participants