Skip to content

[PermissionService] Remove IsCurrentUserAuthorized redundancies#3838

Merged
imnasnainaec merged 5 commits intomasterfrom
perm-service-user
Jun 5, 2025
Merged

[PermissionService] Remove IsCurrentUserAuthorized redundancies#3838
imnasnainaec merged 5 commits intomasterfrom
perm-service-user

Conversation

@imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Jun 3, 2025

This change is Reviewable

@imnasnainaec imnasnainaec self-assigned this Jun 3, 2025
@imnasnainaec imnasnainaec added backend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. labels Jun 3, 2025
@codecov
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.20%. Comparing base (d3fd57d) to head (1c22da0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
Backend/Services/PermissionService.cs 42.85% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3838      +/-   ##
==========================================
+ Coverage   65.87%   73.20%   +7.33%     
==========================================
  Files         235      286      +51     
  Lines        6033    10751    +4718     
  Branches      753     1341     +588     
==========================================
+ Hits         3974     7870    +3896     
- Misses       1815     2483     +668     
- Partials      244      398     +154     
Flag Coverage Δ
backend 82.57% <42.85%> (?)
frontend 65.87% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

{
var currentUserId = GetUserId(request);
return userId == currentUserId;
return userId == GetUserId(request);
Copy link
Contributor

Choose a reason for hiding this comment

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

As this is right now if both of these strings were empty this would return true. Not sure why that would be the case but it would probably be a bug or error and this should return false in that case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

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

the changes look good to me, I'm concerned with some of the ways security is being handled right now but that's not in scope of this PR as you're not really changing anything.

@imnasnainaec
Copy link
Collaborator Author

the changes look good to me, I'm concerned with some of the ways security is being handled right now but that's not in scope of this PR as you're not really changing anything.

@hahn-kev Do tell me more. I'd be glad to improve the security in another pr.

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @hahn-kev and @imnasnainaec)

{
var currentUserId = GetUserId(request);
return userId == currentUserId;
return userId == GetUserId(request);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@imnasnainaec imnasnainaec merged commit 954de79 into master Jun 5, 2025
14 of 15 checks passed
@imnasnainaec imnasnainaec deleted the perm-service-user branch June 5, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants