-
Notifications
You must be signed in to change notification settings - Fork 268
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
Set creator principal id annotation when creating projects and v3 clusters #12233
Merged
mantis-toboggan-md
merged 5 commits into
rancher:master
from
mantis-toboggan-md:principal-ids
Oct 15, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
470ea8a
set principal id annotation when creating projects
mantis-toboggan-md 74305e8
set creator principal id when creating kontainer and machine driver c…
mantis-toboggan-md 170eb57
correct kontainer provisioning principal id annotation
mantis-toboggan-md 8f2cada
add test for project creation
mantis-toboggan-md c69b0b7
fix projects afterEach hook
mantis-toboggan-md File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
cypress/e2e/blueprints/explorer/rbac/third-party-principals-get.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const res = { | ||
type: 'collection', | ||
links: { self: 'https://localhost:8005/v3/principals' }, | ||
actions: { search: 'https://localhost:8005/v3/principals?action=search' }, | ||
pagination: { limit: 1000 }, | ||
sort: { | ||
order: 'asc', | ||
reverse: 'https://localhost:8005/v3/principals?order=desc', | ||
links: { | ||
loginName: 'https://localhost:8005/v3/principals?sort=loginName', name: 'https://localhost:8005/v3/principals?sort=name', principalType: 'https://localhost:8005/v3/principals?sort=principalType', profilePicture: 'https://localhost:8005/v3/principals?sort=profilePicture', profileURL: 'https://localhost:8005/v3/principals?sort=profileURL', provider: 'https://localhost:8005/v3/principals?sort=provider', uuid: 'https://localhost:8005/v3/principals?sort=uuid' | ||
} | ||
}, | ||
filters: { | ||
created: null, creatorId: null, id: null, loginName: null, me: null, memberOf: null, name: null, principalType: null, profilePicture: null, profileURL: null, provider: null, removed: null, uuid: null | ||
}, | ||
resourceType: 'principal', | ||
data: [ | ||
{ | ||
baseType: 'principal', | ||
created: null, | ||
creatorId: null, | ||
id: 'github://1234567890', | ||
links: { self: 'https://localhost:8005/v3/principals/github:%2F%2F1234567890' }, | ||
loginName: 'admin', | ||
me: true, | ||
memberOf: false, | ||
name: 'Default Admin', | ||
principalType: 'user', | ||
provider: 'github', | ||
type: 'principal' | ||
} | ||
] | ||
}; | ||
|
||
export function spoofThirdPartyPrincipal(): Cypress.Chainable<Response> { | ||
return cy.intercept('GET', '/v3/principals', (req) => { | ||
req.reply({ | ||
statusCode: 200, | ||
body: res | ||
}); | ||
}).as('spoofThirdPartyPrincipal'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might make sense to add a utility or a getter to check
isPrincipalIdLocal
.