Feat/corporate email policy#3085
Conversation
Console (appwrite/console)Project ID: Tip Function scopes give you fine-grained control over API permissions |
Greptile SummaryThis PR adds a "Deny non-corporate emails" policy toggle to the Auth Security page, mirroring the existing free-email, aliased-email, and disposable-email policy controls.
Confidence Score: 5/5The change is a straightforward additive feature that mirrors existing, battle-tested patterns; the only new finding is a P2 description-copy nit in the UI toggle. All four changed files follow the established patterns exactly — the load function, state tracking, SDK call, and analytics event are structurally identical to the three existing email policy controls. No new logic or error-handling paths were introduced. updateSignupEmailSecurity.svelte — minor description text improvement suggested for the new toggle. Important Files Changed
Reviews (2): Last reviewed commit: "fix: use Deny non-corporate emails label" | Re-trigger Greptile |
| await projectSdk.updateDenyCorporateEmailPolicy({ | ||
| enabled: authCorporateEmails | ||
| }); | ||
| hasAppliedServerChange = true; | ||
| trackEvent(Submit.AuthCorporateEmailsUpdate); |
There was a problem hiding this comment.
SDK method
updateDenyCorporateEmailPolicy may not exist in the pinned SDK
This PR adds a call to projectSdk.updateDenyCorporateEmailPolicy(...), but the SDK is still pinned at 82d2831 (no package.json or bun.lock changes are included). The three existing policy methods (updateDenyAliasedEmailPolicy, updateDenyDisposableEmailPolicy, updateDenyFreeEmailPolicy) were already present in that commit, but updateDenyCorporateEmailPolicy is only referenced in code added by this PR. Additionally, the policy ID deny-corporate-email is defined in the local ProjectEmailPolicyId constant rather than imported from the SDK's ProjectPolicyId enum, suggesting the SDK may not yet formally support this policy. With strict: false in the TypeScript config, a missing method would not surface as a compile error, so the form would appear to work normally but throw a runtime error on submit.
|
@greptile updateDenyCorporateEmailPolicy exists in the currently pinned SDK at 82d2831confirmed at line 24808 of dist/cjs/sdk.js. No package bump needed. |
|
That's confirmed — thanks for verifying. The method is present at line 24808 of The remaining P2 about the description example is still worth addressing: the current copy says "For example: |

What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)