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

RBAC: Add actionsets struct and write path #86108

Merged
merged 15 commits into from
Apr 19, 2024

Conversation

eleijonmarck
Copy link
Contributor

@eleijonmarck eleijonmarck commented Apr 15, 2024

why/what

We are implementing the actionsets, this is the first in a series of PRs to build the foundation for actionsets.

This PR introduces

  • actionsets struct
  • inmemory management of actionsets
  • writes an additional permission (the actionset) when storing resourcepermissions

Comes from: actionset implementation
https://github.com/grafana/identity-access-team/issues/615

@eleijonmarck eleijonmarck added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Apr 15, 2024
@eleijonmarck eleijonmarck self-assigned this Apr 15, 2024
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.1.x milestone Apr 15, 2024
Copy link
Contributor

@IevaVasiljeva IevaVasiljeva left a comment

Choose a reason for hiding this comment

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

Nice, left some comments

pkg/services/accesscontrol/resourcepermissions/service.go Outdated Show resolved Hide resolved
pkg/services/accesscontrol/resourcepermissions/service.go Outdated Show resolved Hide resolved
pkg/services/accesscontrol/resourcepermissions/service.go Outdated Show resolved Hide resolved
pkg/services/accesscontrol/resourcepermissions/store.go Outdated Show resolved Hide resolved
pkg/services/accesscontrol/resourcepermissions/store.go Outdated Show resolved Hide resolved
pkg/services/accesscontrol/resourcepermissions/store.go Outdated Show resolved Hide resolved
@eleijonmarck eleijonmarck removed the no-backport Skip backport of PR label Apr 17, 2024
@eleijonmarck eleijonmarck marked this pull request as ready for review April 17, 2024 14:57
@eleijonmarck eleijonmarck requested a review from a team as a code owner April 17, 2024 14:57
@eleijonmarck eleijonmarck requested a review from a team April 17, 2024 14:57
@eleijonmarck eleijonmarck requested a review from a team as a code owner April 17, 2024 14:57
@eleijonmarck eleijonmarck requested review from rwwiv, JacobsonMT, yuri-tceretian, grobinson-grafana, papagian, zserge and undef1nd and removed request for a team April 17, 2024 14:57
Copy link
Contributor

@IevaVasiljeva IevaVasiljeva left a comment

Choose a reason for hiding this comment

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

Some suggestions about comments, otherwise LGTM!

s.log.Debug("storing action set\n")
name := s.GetActionSetName(resource, permission)
actionSet := &ActionSet{
// folders:edit
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think this comment can be removed

pkg/services/accesscontrol/resourcepermissions/store.go Outdated Show resolved Hide resolved
pkg/services/accesscontrol/resourcepermissions/store.go Outdated Show resolved Hide resolved
@eleijonmarck eleijonmarck merged commit ddabef9 into main Apr 19, 2024
11 checks passed
@eleijonmarck eleijonmarck deleted the eleijonmarck/actionsets/write-path branch April 19, 2024 14:38
@kevinwcyu kevinwcyu modified the milestones: 11.1.x, 11.1.0 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants