diff --git a/public/language/en-GB/admin/manage/users.json b/public/language/en-GB/admin/manage/users.json index d11670719c..6cd6a14aef 100644 --- a/public/language/en-GB/admin/manage/users.json +++ b/public/language/en-GB/admin/manage/users.json @@ -22,6 +22,7 @@ "delete-content": "Delete User(s) Content", "purge": "Delete User(s) and Content", "download-csv": "Download CSV", + "custom-user-fields": "Custom User Fields", "manage-groups": "Manage Groups", "set-reputation": "Set Reputation", "add-group": "Add Group", diff --git a/public/language/en-GB/admin/menu.json b/public/language/en-GB/admin/menu.json index 9093aad71a..6e30be22b3 100644 --- a/public/language/en-GB/admin/menu.json +++ b/public/language/en-GB/admin/menu.json @@ -12,7 +12,6 @@ "manage/privileges": "Privileges", "manage/tags": "Tags", "manage/users": "Users", - "manage/custom-user-fields": "Custom User Fields", "manage/admins-mods": "Admins & Mods", "manage/registration": "Registration Queue", "manage/flagged-content": "Flagged Content", diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml index 427026ecf8..f6104b495e 100644 --- a/public/openapi/read.yaml +++ b/public/openapi/read.yaml @@ -106,6 +106,8 @@ paths: $ref: 'read/admin/manage/tags.yaml' /api/admin/manage/users: $ref: 'read/admin/manage/users.yaml' + /api/admin/manage/users/custom-fields: + $ref: 'read/admin/manage/users/custom-fields.yaml' /api/admin/manage/registration: $ref: 'read/admin/manage/registration.yaml' /api/admin/manage/admins-mods: diff --git a/public/openapi/read/admin/manage/users/custom-fields.yaml b/public/openapi/read/admin/manage/users/custom-fields.yaml new file mode 100644 index 0000000000..68c99e0ef2 --- /dev/null +++ b/public/openapi/read/admin/manage/users/custom-fields.yaml @@ -0,0 +1,27 @@ +get: + tags: + - admin + summary: Manage custom fields for users + responses: + "200": + description: "" + content: + application/json: + schema: + allOf: + - type: object + properties: + fields: + type: array + items: + type: object + properties: + key: + type: string + name: + type: string + select-options: + type: string + type: + type: string + - $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps \ No newline at end of file diff --git a/public/openapi/read/user/userslug.yaml b/public/openapi/read/user/userslug.yaml index 4858383cd3..6d8a1d0701 100644 --- a/public/openapi/read/user/userslug.yaml +++ b/public/openapi/read/user/userslug.yaml @@ -31,6 +31,8 @@ get: type: string allowCoverPicture: type: boolean + customUserFields: + type: array selectedGroup: type: array items: diff --git a/public/openapi/read/user/userslug/edit.yaml b/public/openapi/read/user/userslug/edit.yaml index 8ba486b5e8..e7fdb560a0 100644 --- a/public/openapi/read/user/userslug/edit.yaml +++ b/public/openapi/read/user/userslug/edit.yaml @@ -66,6 +66,8 @@ get: type: number title: type: string + customUserFields: + type: array editButtons: type: array items: diff --git a/src/views/admin/manage/users.tpl b/src/views/admin/manage/users.tpl index 6d8dfca9ea..fb80f94b0f 100644 --- a/src/views/admin/manage/users.tpl +++ b/src/views/admin/manage/users.tpl @@ -81,6 +81,8 @@
  • [[admin/manage/users:create]]
  • {{{ if showInviteButton }}}
  • [[admin/manage/users:invite]]
  • {{{ end }}}
  • [[admin/manage/users:download-csv]]
  • +
  • [[admin/manage/users:custom-user-fields]] +
  • diff --git a/src/views/admin/partials/navigation.tpl b/src/views/admin/partials/navigation.tpl index d3a5691b50..95b8e6b939 100644 --- a/src/views/admin/partials/navigation.tpl +++ b/src/views/admin/partials/navigation.tpl @@ -38,7 +38,6 @@ {{{ end }}} {{{ if user.privileges.admin:users }}} [[admin/menu:manage/users]] - [[admin/menu:manage/custom-user-fields]] {{{ end }}} {{{ if user.privileges.admin:groups }}} [[admin/menu:manage/groups]]