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

Bind namespace #1425

Merged
merged 14 commits into from
May 10, 2022
Merged

Bind namespace #1425

merged 14 commits into from
May 10, 2022

Conversation

enrichman
Copy link
Member

@enrichman enrichman commented May 5, 2022

Ref:


This PR will handle namespaces authorization with users.

When a User creates a namespace then the namespace will be automatically assigned to him.
When a User deletes a namespace it will be unassigned from ALL the users.

@enrichman enrichman self-assigned this May 5, 2022
@enrichman enrichman changed the base branch from main to spike-authz-epinio May 5, 2022 15:22
@codecov-commenter
Copy link

codecov-commenter commented May 5, 2022

Codecov Report

Merging #1425 (a0702d7) into main (4b3c038) will decrease coverage by 0.05%.
The diff coverage is 5.66%.

@@           Coverage Diff            @@
##            main   #1425      +/-   ##
========================================
- Coverage   8.50%   8.44%   -0.06%     
========================================
  Files         78      78              
  Lines       7444    7492      +48     
========================================
  Hits         633     633              
- Misses      6773    6821      +48     
  Partials      38      38              
Flag Coverage Δ
unittests 8.44% <5.66%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/auth/auth.go 32.95% <3.84%> (-39.55%) ⬇️
internal/auth/user.go 53.06% <100.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 4b3c038...a0702d7. Read the comment docs.

Base automatically changed from spike-authz-epinio to main May 6, 2022 14:56
@enrichman enrichman marked this pull request as ready for review May 10, 2022 08:40
@enrichman enrichman requested a review from a team as a code owner May 10, 2022 08:40
@jimmykarily jimmykarily self-requested a review May 10, 2022 11:54
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
acceptance/api/v1/namespace_auth_test.go Outdated Show resolved Hide resolved
})
})

When("user2 try to show a namespace", func() {
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 user1 and user2 are symmetric in this test, we don't need to test them both. There is nothing special about user1 compared to user2.

internal/auth/auth.go Outdated Show resolved Hide resolved
enrichman and others added 2 commits May 10, 2022 14:28
Co-authored-by: Dimitris Karakasilis <jimmykarily@gmail.com>
jimmykarily
jimmykarily previously approved these changes May 10, 2022
@enrichman enrichman merged commit 6d5d101 into main May 10, 2022
@enrichman enrichman deleted the bind-namespace branch May 10, 2022 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants