Skip to content

Conversation

pasha-codefresh
Copy link
Member

In this PR you can define user and assign rbac rules to him
Example:

accountFixture.Given(t).
	Name("test").
	When().
	Create().
	Login().
	SetPermissions([]fixture.ACL{
		{
			Resource: "repositories",
			Action:   "create",
			Scope:    "argo-project/*",
		},
		{
			Resource: "repositories",
			Action:   "delete",
			Scope:    "argo-pr/*",
		},
		{
			Resource: "repositories",
			Action:   "get",
			Scope:    "argo-project/*",
		},
	}, "org-admin")

Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
… of github.com:pasha-codefresh/argo-cd into scoped-resources-rbac-test

� Conflicts:
�	test/e2e/fixture/fixture.go
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
…m:pasha-codefresh/argo-cd into scoped-resources-rbac-test

� Conflicts:
�	test/e2e/fixture/account/actions.go
�	test/e2e/fixture/fixture.go
@pasha-codefresh pasha-codefresh added enhancement New feature or request component:test Test requests (e2e or unit) labels Sep 9, 2021
@pasha-codefresh pasha-codefresh changed the title feat: Ability to test rbac feat: Ability to test rbac and implement it with scoped repos Sep 9, 2021
Signed-off-by: pashavictorovich <pavel@codefresh.io>
@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #7187 (0012f47) into master (e0c07b8) will decrease coverage by 0.00%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7187      +/-   ##
==========================================
- Coverage   41.04%   41.03%   -0.01%     
==========================================
  Files         158      158              
  Lines       21300    21297       -3     
==========================================
- Hits         8742     8740       -2     
  Misses      11305    11305              
+ Partials     1253     1252       -1     
Impacted Files Coverage Δ
cmd/argocd/commands/repo.go 0.00% <0.00%> (ø)
server/repository/repository.go 35.65% <75.00%> (-0.24%) ⬇️
util/settings/settings.go 47.15% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0c07b8...0012f47. Read the comment docs.

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

Thank you!

@alexmt alexmt merged commit 08d1cf0 into argoproj:master Sep 10, 2021
plakyda-codefresh pushed a commit to plakyda-codefresh/argo-cd that referenced this pull request Sep 28, 2021
…oj#7187)

feat: Ability to test rbac and implement it with scoped repos (argoproj#7187)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: viktorplakida <plakyda1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:test Test requests (e2e or unit) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants