Skip to content

Chore/auth testing#131

Merged
lfbrehm merged 12 commits intodevfrom
chore/auth_testing
Oct 31, 2023
Merged

Chore/auth testing#131
lfbrehm merged 12 commits intodevfrom
chore/auth_testing

Conversation

@lfbrehm
Copy link
Copy Markdown
Member

@lfbrehm lfbrehm commented Oct 30, 2023

This PR contains bug fixes for:

  • Authorization logic
  • Naming validation for resources
  • License defaults
  • CreateHooks are now triggered on finish for objects
  • Timestamps for hooks are now parsed from seconds

@lfbrehm lfbrehm requested review from St4NNi and das-Abroxas October 30, 2023 12:43
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 30, 2023

Codecov Report

Attention: 67 lines in your changes are missing coverage. Please review.

Comparison is base (573f800) 53.03% compared to head (c2fe6e1) 53.17%.
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #131      +/-   ##
==========================================
+ Coverage   53.03%   53.17%   +0.14%     
==========================================
  Files          73       73              
  Lines       10876    10982     +106     
==========================================
+ Hits         5768     5840      +72     
- Misses       5108     5142      +34     
Files Coverage Δ
src/auth/permission_handler.rs 50.00% <ø> (ø)
src/auth/structs.rs 57.62% <100.00%> (ø)
src/database/dsls/license_dsl.rs 80.00% <ø> (ø)
src/grpc/collections.rs 91.23% <ø> (ø)
src/grpc/projects.rs 91.35% <ø> (ø)
src/middlelayer/hooks_request_types.rs 0.00% <0.00%> (ø)
src/caching/cache.rs 77.31% <57.14%> (-0.10%) ⬇️
src/grpc/object.rs 15.04% <0.00%> (-0.13%) ⬇️
src/middlelayer/user_request_types.rs 52.38% <50.00%> (-0.40%) ⬇️
src/middlelayer/create_request_types.rs 77.97% <86.48%> (+0.37%) ⬆️
... and 4 more

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@das-Abroxas das-Abroxas left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.

Comment thread src/grpc/search.rs Outdated
DataClass::PRIVATE => {
// TODO: Redacted object operations
// TODO: SPECIFIC private operations OTHER THAN strip labels
// -> maybe endpoint redaction?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also the field created_by could be emptied even if it is 'just' an id.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point

Comment thread src/grpc/search.rs Outdated
DataClass::PRIVATE => {
//TODO: Redacted object
// TODO: SPECIFIC private operations OTHER THAN strip labels
// -> maybe endpoint redaction?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Copy Markdown
Member

@St4NNi St4NNi left a comment

Choose a reason for hiding this comment

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

Just a minor change!

Comment thread src/auth/structs.rs
impl Default for Context {
fn default() -> Self {
Self {
variant: ContextVariant::Activated,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think default should be activated and notactivated the "special" case.
Just to be sure that as a bare minimum the user is activated

@lfbrehm lfbrehm merged commit ced1eff into dev Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants