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

fix: Authorization for Profile Actions & Limit Data exposure #908

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

ShubhamPalriwala
Copy link
Contributor

What does this PR do?

Edit and Delete is now done for the user by fetching from the server session rather than a client side passed parameter.

Also a couple of services did not have the response selection hence were returning passwords/other non reqd user fields. That has also been tackled in this.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Added a screen recording or screenshots to this PR
  • Filled out the "How to test" section in this PR
  • Read the contributing guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues
  • Updated the Formbricks Docs if changes were necessary

@vercel
Copy link

vercel bot commented Oct 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formbricks-cloud ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 1:30pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
formbricks-com ⬜️ Ignored (Inspect) Visit Preview Oct 2, 2023 1:30pm

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

Thank you for following the naming conventions for pull request titles! 🙏

@@ -52,7 +50,7 @@ function DeleteAccountModal({ setOpen, open, session, profile }: DeleteAccountMo
const deleteAccount = async () => {
try {
setDeleting(true);
await profileDeleteAction(profile.id);
await profileDeleteAction();
Copy link
Member

Choose a reason for hiding this comment

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

please rename to deleteProfileAction

@@ -19,7 +19,7 @@ export function EditName({ profile }: { profile: TProfile }) {
className="w-full max-w-sm items-center"
onSubmit={handleSubmit(async (data) => {
try {
await profileEditAction(profile.id, data);
await profileEditAction(data);
Copy link
Member

Choose a reason for hiding this comment

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

please rename to updateProfileAction

@mattinannt mattinannt merged commit a9c8e99 into main Oct 2, 2023
11 of 12 checks passed
@mattinannt mattinannt deleted the shubham/auth-for-profile branch October 2, 2023 13:40
waseemrabani pushed a commit to LuminosoInsight/formbricks that referenced this pull request Feb 2, 2024
* feat: authzn and limit sensitive info from profile actions

* fix: work on suggested changes
waseemrabani pushed a commit to LuminosoInsight/formbricks that referenced this pull request Feb 2, 2024
* feat: authzn and limit sensitive info from profile actions

* fix: work on suggested changes
waseemrabani pushed a commit to LuminosoInsight/formbricks that referenced this pull request Feb 2, 2024
* feat: authzn and limit sensitive info from profile actions

* fix: work on suggested changes
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.

None yet

2 participants