mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-04-25 22:05:51 +03:00
[PR #373] [MERGED] feat: add NO_LIMIT_SEND_ROLE #551
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudflare_temp_email#551
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/373
Author: @dreamhunter2333
Created: 8/4/2024
Status: ✅ Merged
Merged: 8/4/2024
Merged by: @dreamhunter2333
Base:
main← Head:feature/dev📝 Commits (1)
7cb2a83feat: add NO_LIMIT_SEND_ROLE📊 Changes
10 files changed (+54 additions, -18 deletions)
View changed files
📝
CHANGELOG.md(+2 -1)📝
frontend/src/store/index.js(+1 -1)📝
vitepress-docs/docs/en/cli.md(+2 -1)📝
vitepress-docs/docs/zh/guide/cli/worker.md(+2 -1)📝
worker/src/commom_api.ts(+1 -1)📝
worker/src/mails_api/index.ts(+4 -2)📝
worker/src/mails_api/send_mail_api.ts(+12 -8)📝
worker/src/types.d.ts(+4 -2)📝
worker/src/worker.ts(+25 -0)📝
worker/wrangler.toml.template(+1 -1)📄 Description
User description
#369
PR Type
Enhancement, Documentation
Description
NO_LIMIT_SEND_ROLEenvironment variable to allow specific roles to send emails without balance limits.showGithublogic to useDISABLE_SHOW_GITHUBenvironment variable.Changes walkthrough 📝
6 files
commom_api.ts
Modify GitHub visibility logicworker/src/commom_api.ts
showGithublogic to useDISABLE_SHOW_GITHUBenvironmentvariable.
index.ts
Add role-based unlimited send mail featureworker/src/mails_api/index.ts
user_roleretrieval from context.NO_LIMIT_SEND_ROLEand set balanceaccordingly.
send_mail_api.ts
Implement role-based balance check bypassworker/src/mails_api/send_mail_api.ts
user_roleretrieval from context.NO_LIMIT_SEND_ROLE.types.d.ts
Update type definitions for new environment variables and user roleworker/src/types.d.ts
NO_LIMIT_SEND_ROLEandDISABLE_SHOW_GITHUBtoBindings.userRolePayloadtoVariables.worker.ts
Add middleware to check user role from tokenworker/src/worker.ts
checkoutUserRolePayloadfunction to retrieve user role fromtoken.
checkoutUserRolePayloadinto middleware for specific APIroutes.
index.js
Set default GitHub visibility to truefrontend/src/store/index.js
showGithubtotrue.4 files
CHANGELOG.md
Update changelog for new environment variablesCHANGELOG.md
DISABLE_SHOW_GITHUBandNO_LIMIT_SEND_ROLE.cli.md
Document new environment variables in CLI documentationvitepress-docs/docs/en/cli.md
DISABLE_SHOW_GITHUBandNO_LIMIT_SEND_ROLEenvironmentvariables.
worker.md
Document new environment variables in Chinese CLI guidevitepress-docs/docs/zh/guide/cli/worker.md
DISABLE_SHOW_GITHUBandNO_LIMIT_SEND_ROLEenvironmentvariables in Chinese guide.
wrangler.toml.template
Update wrangler template with new environment variablesworker/wrangler.toml.template
DISABLE_SHOW_GITHUBandNO_LIMIT_SEND_ROLEenvironment variablesto template.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.