Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: addrbac_roles tocoder_workspace_owner data source#330

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 1 commit intocoder:mainfromnxf5025:rbac-roles-to-data-source
Mar 14, 2025

Conversation

nxf5025
Copy link
Contributor

@nxf5025nxf5025 commentedJan 23, 2025
edited
Loading

This PR updates the schema for the coder_workspace_owner data source to expose rbac_roles.

It's very similar to#287

Relevantcoder/coder PR -coder/coder#16407

josephteddick and matifali reacted with thumbs up emoji
@github-actionsGitHub Actions
Copy link

github-actionsbot commentedJan 23, 2025
edited
Loading

All contributors have signed the CLA ✍️ ✅
Posted by theCLA Assistant Lite bot.

@nxf5025
Copy link
ContributorAuthor

I have read the CLA Document and I hereby sign the CLA

@nxf5025nxf5025force-pushed therbac-roles-to-data-source branch fromd784267 to7414a32CompareJanuary 27, 2025 14:01
@Emyrk
Copy link
Member

It does require some coder/coder updates.

I have plans to pull in more user context such asgroups. 👍

@nxf5025nxf5025force-pushed therbac-roles-to-data-source branch from0c3001a to9bae197CompareJanuary 30, 2025 23:36
Emyrk pushed a commit to coder/coder that referenced this pull requestMar 2, 2025
@matifalimatifali requested a review fromEmyrkMarch 4, 2025 20:42
@matifalimatifali changed the titlefeat: Add rbac_roles to coder_workspace_owner data sourcefeat: add rbac_roles tocoder_workspace_owner data sourceMar 5, 2025
@matifalimatifali changed the titlefeat: add rbac_roles tocoder_workspace_owner data sourcefeat: addrbac_roles tocoder_workspace_owner data sourceMar 5, 2025
Comment on lines 62 to 68
var rbacRoles []string
if rolesRaw, ok := os.LookupEnv("CODER_WORKSPACE_OWNER_RBAC_ROLES"); ok {
if err := json.NewDecoder(strings.NewReader(rolesRaw)).Decode(&rbacRoles); err != nil {
return diag.Errorf("invalid user rbac roles: %s", err.Error())
}
}
_ = rd.Set("rbac_roles", rbacRoles)
Copy link
Member

Choose a reason for hiding this comment

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

CODER_WORKSPACE_OWNER_RBAC_ROLES is now a data structure right?

https://github.com/coder/coder/blob/77479cdd51f5154054e27734b30900a01f014729/provisionersdk/proto/provisioner.proto#L258-L261

So we need to json decode the env var, and correct the schema to be an object with 2 fields:name andorg_id.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Correct - I plan to revisit this today or tomorrow and make the updates based on the changes in the other PR

Copy link
Member

Choose a reason for hiding this comment

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

@nxf5025 awesome, just keep pinging me 👍

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@Emyrk - Just pushed an update. Let me know if any changes are needed

@nxf5025nxf5025force-pushed therbac-roles-to-data-source branch from9bae197 to8d20979CompareMarch 5, 2025 20:26
@nxf5025
Copy link
ContributorAuthor

Hey@Emyrk - Anything else you need from my end?

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

LG 👍

@EmyrkEmyrk merged commiteab8698 intocoder:mainMar 14, 2025
1 of 3 checks passed
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 14, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@nxf5025@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp