Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

[KLO-238] Fix/auth login for non verified users#298

Merged
nxtcoder17 merged 2 commits into
mainfrom
fix/auth-login-for-non-verified-users
Mar 14, 2024
Merged

[KLO-238] Fix/auth login for non verified users#298
nxtcoder17 merged 2 commits into
mainfrom
fix/auth-login-for-non-verified-users

Conversation

@nxtcoder17
Copy link
Copy Markdown
Member

@nxtcoder17 nxtcoder17 commented Mar 14, 2024

@nxtcoder17 nxtcoder17 requested a review from karthik1729 as a code owner March 14, 2024 09:43
@nxtcoder17 nxtcoder17 changed the title Fix/auth login for non verified users [KLO-238] Fix/auth login for non verified users Mar 14, 2024
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @nxtcoder17 - I've reviewed your changes and they look great!

General suggestions:

  • Ensure that the new permission model introduced by the changes aligns with the intended security posture.
  • Review the migration of domain logic to the entities package for completeness and correctness.
  • Verify that the new error handling patterns are consistently applied across the codebase.
  • Double-check for any unintended duplications or omissions in the GraphQL schema updates.
Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

// for clusters
t.CreateCluster: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember},
t.DeleteCluster: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember},
t.UpdateCluster: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 suggestion (security): Adding t.RoleAccountMember to the UpdateCluster action increases the scope of who can perform this action. Ensure that this aligns with the intended permission model and security posture, as it allows a broader set of roles to modify cluster configurations.

Comment on lines 11 to 13
type Domain interface {
SetRemoteLoginAuthHeader(ctx context.Context, loginId repos.ID, authHeader string) error
GetRemoteLogin(ctx context.Context, loginId repos.ID, secret string) (*RemoteLogin, error)
GetRemoteLogin(ctx context.Context, loginId repos.ID, secret string) (*entities.RemoteLogin, error)
CreateRemoteLogin(ctx context.Context, secret string) (repos.ID, error)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (code_refinement): The transition to using entities.RemoteLogin instead of RemoteLogin directly is a good practice for encapsulating domain logic. However, ensure that all necessary fields and methods are correctly migrated to the entities package to avoid runtime issues.

@nxtcoder17 nxtcoder17 merged commit 1afb822 into main Mar 14, 2024
@nxtcoder17 nxtcoder17 deleted the fix/auth-login-for-non-verified-users branch March 14, 2024 09:46
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
…d-users

[KLO-238] Fix/auth login for non verified users
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[KLO-238] [API/Auth] Non Verified User should be allowed to login

1 participant