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
Show only the last 4 characters of Global API Key & Zone ID in Cloudflare add-on #3376
Comments
Scope a solution ✅The solution is quite simple. We will create a new function here to mask the values of any input
Then we can call this function with the ids of the fields we want to mask in this case, it would be To solve the issue of saving the masked value, we can update this line here to act as a proxy field by changing the key to Then we will add the concrete id - Then we unset the proxy field here Lastly we bind the 2 fields together by updating the maskField function above to become
Before updating the concrete field on input event, we can check if value contains '*' and if not update. finally we mask the proxy field. Estimate the effort ✅[S] |
Looks fine to me. |
Won't that make it that when saving the value, it will contain the |
@Tabrisrp I updated the grooming based on your last point, What do you think? |
New proposed solution looks good to me |
Is your feature request related to a problem? Please describe.
WP Rocket settings (accessible by all admins) displays the Cloudflare Global API Key and Zone ID.
Describe the solution you'd like
Once entered and saved, they don't need to be shown on the page.
We could display only the last 4 characters of the Cloudflare Global API Key and Zone ID. The rest will be hidden as if it was an input typed password.
Additional context
https://wp-media.productboard.com/insights/shared-inbox/notes/12491405
The text was updated successfully, but these errors were encountered: