# 管理员能否创建仅在管理面板中可见/可编辑的用户字段？

**URL:** https://meta.discourse.org/t/can-admins-create-user-fields-that-are-only-visible-editable-in-the-admin-panel/386919
**Category:** Support
**Tags:** user-custom-fields
**Created:** [2025年十月28日 11:32 UTC](https://meta.discourse.org/t/can-admins-create-user-fields-that-are-only-visible-editable-in-the-admin-panel/386919 "2025-10-28T11:32:35Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [2025年十一月5日 18:43 UTC](https://meta.discourse.org/t/can-admins-create-user-fields-that-are-only-visible-editable-in-the-admin-panel/386919/10 "2025-11-05T18:43:37Z")

</div>

> [@copymonopoly](#):
>
> 我注意到管理后台有一个名为 **“Staff user custom fields”** 的设置。我不太确定它的用途或如何使用它。

我也不确定这个设置，但发现了一些线索……

与配套的 `Public user custom fields` 设置放在一起看，就更容易理解了：

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/e/a/4ea9a4f7fe20fbb94823847ba057458d51099778.png)

它们与谁可以通过 API 访问哪些记录有关：

> [@Using the API to retrive the value of a custom user field from a user](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751/2?u=toddz):
>
> If you whitelist a user custom field in public user custom fields site setting then you can get it in /u/USERNAME.json API endpoint. Else if you whitelist in staff user custom fields setting then you can get it in the same API endpoint if you used a staff user’s / global api key.

有趣的是，上面的字段似乎不是从可用的用户自定义字段中选择，而是接受任何文本输入——所以你必须 ~~精确输入字段名称~~ [仔细阅读此文档](https://meta.discourse.org/t/adding-non-visible-user-custom-fields-to-the-api/276618?u=toddz)。

---

_[View the full topic](https://meta.discourse.org/t/can-admins-create-user-fields-that-are-only-visible-editable-in-the-admin-panel/386919)._
