[PR #741] [MERGED] feat: add role-based address limit configuration #732

Closed
opened 2026-02-26 21:32:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741
Author: @dreamhunter2333
Created: 10/12/2025
Status: Merged
Merged: 10/12/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/email


📝 Commits (1)

  • 165e8bd feat: add role-based address limit configuration

📊 Changes

7 files changed (+209 additions, -8 deletions)

View changed files

📝 frontend/src/views/Admin.vue (+6 -0)
frontend/src/views/admin/RoleAddressConfig.vue (+153 -0)
📝 worker/src/admin_api/admin_user_api.ts (+11 -1)
📝 worker/src/admin_api/index.ts (+2 -0)
📝 worker/src/constants.ts (+1 -0)
📝 worker/src/models/index.ts (+7 -0)
📝 worker/src/user_api/bind_address.ts (+29 -7)

📄 Description

User description

#738

  • Add RoleAddressConfig component in admin panel
  • Implement role_address_config API endpoints (GET/POST)
  • Add getMaxAddressCount function with validation chain
  • Priority: role config > global settings
  • Support editable table with clearable input
  • Add extensible RoleConfig type for future fields
  • Use context for current user, query DB for target user
  • Optimize state management (remove redundant roleConfigsMap)

🤖 Generated with Claude Code


PR Type

Enhancement, Bug fix


Description

  • Introduced role-based email address limits in the admin panel.

  • Added RoleAddressConfig component for managing role-specific limits.

  • Implemented backend API endpoints for fetching and saving configurations.

  • Enhanced validation logic for address binding with role-based limits.


Changes walkthrough 📝

Relevant files
Enhancement
4 files
Admin.vue
Added `RoleAddressConfig` tab in the admin panel.               
+6/-0     
RoleAddressConfig.vue
New component for managing role-based address limits.       
+153/-0 
admin_user_api.ts
Added API methods for role-based address configuration.   
+11/-1   
index.ts
Defined `RoleConfig` and `RoleAddressConfig` types.           
+7/-0     
Configuration changes
2 files
index.ts
Registered new API routes for role-based configurations. 
+2/-0     
constants.ts
Added constant for role address configuration key.             
+1/-0     
Bug fix
1 files
bind_address.ts
Enhanced address binding logic with role-based limits.     
+29/-7   

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.

  • 🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 10/12/2025 **Status:** ✅ Merged **Merged:** 10/12/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/email` --- ### 📝 Commits (1) - [`165e8bd`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/165e8bdf94ad746bac09cff283f69ddd0028c90f) feat: add role-based address limit configuration ### 📊 Changes **7 files changed** (+209 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/views/Admin.vue` (+6 -0) ➕ `frontend/src/views/admin/RoleAddressConfig.vue` (+153 -0) 📝 `worker/src/admin_api/admin_user_api.ts` (+11 -1) 📝 `worker/src/admin_api/index.ts` (+2 -0) 📝 `worker/src/constants.ts` (+1 -0) 📝 `worker/src/models/index.ts` (+7 -0) 📝 `worker/src/user_api/bind_address.ts` (+29 -7) </details> ### 📄 Description ### **User description** #738 - Add RoleAddressConfig component in admin panel - Implement role_address_config API endpoints (GET/POST) - Add getMaxAddressCount function with validation chain - Priority: role config > global settings - Support editable table with clearable input - Add extensible RoleConfig type for future fields - Use context for current user, query DB for target user - Optimize state management (remove redundant roleConfigsMap) 🤖 Generated with [Claude Code](https://claude.ai/code) ___ ### **PR Type** Enhancement, Bug fix ___ ### **Description** - Introduced role-based email address limits in the admin panel. - Added `RoleAddressConfig` component for managing role-specific limits. - Implemented backend API endpoints for fetching and saving configurations. - Enhanced validation logic for address binding with role-based limits. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>4 files</summary><table> <tr> <td><strong>Admin.vue</strong><dd><code>Added `RoleAddressConfig` tab in the admin panel.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-78137b072a7fa52c6d503efb9a3d32c07da5073dd5ca32ac48b1402ac2481a55">+6/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>RoleAddressConfig.vue</strong><dd><code>New component for managing role-based address limits.</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-222ed82c54da3fdffcf5abb4dfbaa3e7196ea4786c473eebe2b002926c5aae5d">+153/-0</a>&nbsp; </td> </tr> <tr> <td><strong>admin_user_api.ts</strong><dd><code>Added API methods for role-based address configuration.</code>&nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-2843fd3d54aa9aa8054d2530e84a06de3068c31fd5c7d5246db5d2a4234a6196">+11/-1</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>index.ts</strong><dd><code>Defined `RoleConfig` and `RoleAddressConfig` types.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-430bcc4ffa98738e7419c774a53ba2ce8b5127a36b3741e89bf36b95a56f02bc">+7/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>2 files</summary><table> <tr> <td><strong>index.ts</strong><dd><code>Registered new API routes for role-based configurations.</code>&nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-b470c4c47ce4a700cd8aac644d07d8a747d439bb6d69e9392a198b3a931fe2e7">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>constants.ts</strong><dd><code>Added constant for role address configuration key.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-cab08ba19c1499ed426fc4918a5613e22eb95c3427c7467ce330f5ee0d69d01e">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Bug fix</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>bind_address.ts</strong><dd><code>Enhanced address binding logic with role-based limits.</code>&nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/741/files#diff-ada3e8ad268246f0c99c97065551303c02fded466c73a4f525f6206cb49bdebf">+29/-7</a>&nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:32:44 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#732
    No description provided.