feat(users): govern profiles and access
Normalize fixed profile fields, profile actions, and the five-column capability matrix for comments, uploads, and downloads.
This commit is contained in:
@@ -15,7 +15,6 @@ export const orderSchema = {
|
||||
payment_order_max_minutes: 30,
|
||||
pay_mark: '付费',
|
||||
pay_box_position: 'top',
|
||||
pay_free_logged_show: false,
|
||||
payment_show_ip: false,
|
||||
payment_show_device: false,
|
||||
payment_show_order_no: true,
|
||||
@@ -58,7 +57,6 @@ export const orderSchema = {
|
||||
fields: [
|
||||
{ key: 'pay_mark', label: '付费标记', type: 'input', default: '付费' },
|
||||
{ key: 'pay_box_position', label: '付费框位置', type: 'radio', default: 'top', options: [{ label: '文章框顶部(封面后)', value: 'box_top' }, { label: '正文顶部', value: 'top' }, { label: '正文底部', value: 'bottom' }, { label: '文章框底部(相关前)', value: 'box_bottom' }] },
|
||||
{ key: 'pay_free_logged_show', label: '登录用户显示免费', type: 'switch', default: false },
|
||||
{ key: 'payment_show_ip', label: '显示用户IP', type: 'switch', default: false },
|
||||
{ key: 'payment_show_device', label: '显示设备信息', type: 'switch', default: false },
|
||||
{ key: 'payment_show_order_no', label: '显示订单号', type: 'switch', default: true },
|
||||
|
||||
@@ -16,7 +16,6 @@ export const paidSchema = {
|
||||
pay_box_position: 'top',
|
||||
payment_download_enable: false,
|
||||
payment_down_alone_page: false,
|
||||
pay_free_logged_show: false,
|
||||
payment_download_remote_s: true,
|
||||
payment_download_verify_nonce: true,
|
||||
payment_download_user_log: 50,
|
||||
@@ -56,7 +55,6 @@ export const paidSchema = {
|
||||
{ key: 'pay_show_user', label: '显示购买用户', type: 'switch', default: true },
|
||||
{ key: 'pay_show_paycount', label: '显示购买次数', type: 'switch', default: true },
|
||||
{ key: 'pay_box_position', label: '付费框位置', type: 'radio', default: 'top', options: [{ label: '文章框顶部(封面后)', value: 'box_top' }, { label: '正文顶部', value: 'top' }, { label: '正文底部', value: 'bottom' }, { label: '文章框底部(相关前)', value: 'box_bottom' }] },
|
||||
{ key: 'pay_free_logged_show', label: '免费资源需登录后下载', type: 'switch', default: false, help: '开启后,价格为 0 的下载资源也要求登录才可下载(对齐 zibll pay_free_logged_show)。' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -209,35 +209,6 @@ export const permissionsSchemas = {
|
||||
],
|
||||
},
|
||||
|
||||
/**
|
||||
* Comment permissions
|
||||
*/
|
||||
comment: {
|
||||
key: 'permissions.comment',
|
||||
title: '评论权限',
|
||||
icon: 'fas fa-comment-dots',
|
||||
description: '控制评论功能的开关和权限要求。',
|
||||
defaults: {
|
||||
comment_allow: true,
|
||||
comment_require_login: false,
|
||||
comment_nested_depth: 3,
|
||||
comment_allow_reply: true,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '评论基础',
|
||||
icon: 'fas fa-cog',
|
||||
fields: [
|
||||
{ key: 'comment_allow', label: '允许评论', type: 'switch', help: '全局开启评论功能' },
|
||||
{ key: 'comment_require_login', label: '需登录评论', type: 'switch', help: '只有登录用户才能评论' },
|
||||
{ key: 'comment_nested_depth', label: '嵌套层级', type: 'slider', min: 1, max: 5, default: 3 },
|
||||
{ key: 'comment_allow_reply', label: '允许回复', type: 'switch' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/**
|
||||
* Attachment permissions
|
||||
*/
|
||||
@@ -247,27 +218,18 @@ export const permissionsSchemas = {
|
||||
icon: 'fas fa-paperclip',
|
||||
description: '控制文件上传和附件下载权限。',
|
||||
defaults: {
|
||||
allow_avatar_upload: true,
|
||||
allow_cover_upload: true,
|
||||
allow_background_upload: false,
|
||||
avatar_max_size: 2,
|
||||
allow_submit_images: true,
|
||||
submit_image_max_size: 5,
|
||||
allow_comment_images: false,
|
||||
comment_image_max_size: 2,
|
||||
allow_resource_upload: true,
|
||||
resource_max_size: 50,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'profile',
|
||||
title: '头像与封面',
|
||||
title: '用户资料卡背景图',
|
||||
icon: 'fas fa-user-circle',
|
||||
fields: [
|
||||
{ key: 'allow_avatar_upload', label: '允许用户上传头像', type: 'switch' },
|
||||
{ key: 'allow_cover_upload', label: '允许用户上传封面图', type: 'switch' },
|
||||
{ key: 'allow_background_upload', label: '允许用户上传背景图', type: 'switch' },
|
||||
{ key: 'avatar_max_size', label: '头像/封面大小上限 (MB)', type: 'number', min: 1, max: 10 },
|
||||
{ key: 'avatar_max_size', label: '头像/用户资料卡背景图大小上限 (MB)', type: 'number', min: 1, max: 10 },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -275,9 +237,7 @@ export const permissionsSchemas = {
|
||||
title: '内容上传',
|
||||
icon: 'fas fa-images',
|
||||
fields: [
|
||||
{ key: 'allow_submit_images', label: '允许投稿插入图片', type: 'switch' },
|
||||
{ key: 'submit_image_max_size', label: '投稿图片大小上限 (MB)', type: 'number', min: 1, max: 20 },
|
||||
{ key: 'allow_comment_images', label: '允许评论插入图片', type: 'switch' },
|
||||
{ key: 'comment_image_max_size', label: '评论图片大小上限 (MB)', type: 'number', min: 1, max: 10 },
|
||||
],
|
||||
},
|
||||
@@ -286,23 +246,10 @@ export const permissionsSchemas = {
|
||||
title: '资源附件',
|
||||
icon: 'fas fa-file-archive',
|
||||
fields: [
|
||||
{ key: 'allow_resource_upload', label: '允许资源附件上传', type: 'switch' },
|
||||
{ key: 'resource_max_size', label: '资源附件大小上限 (MB)', type: 'number', min: 1, max: 200 },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/**
|
||||
* Download permissions — live UI is DownloadPermissions.vue via cms_features.
|
||||
* Keep empty schema so SchemaPage cannot mis-write aksrt_settings.
|
||||
*/
|
||||
download: {
|
||||
key: 'permissions.download',
|
||||
title: '下载权限',
|
||||
icon: 'fas fa-download',
|
||||
description: '下载门槛由 DownloadPermissions 页维护(cms_features);人机验证服务商在「人机验证」页。',
|
||||
defaults: {},
|
||||
groups: [],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -11,14 +11,11 @@ export const commentSchema = {
|
||||
comment_paging_ajax_ias_max: 3,
|
||||
comment_nested_depth: 3,
|
||||
comment_avatar_size: 48,
|
||||
comment_require_login: false,
|
||||
comment_allow_reply: true,
|
||||
comment_close_comments: false,
|
||||
comment_edit_window: 10,
|
||||
comment_smilie: true,
|
||||
comment_code: true,
|
||||
comment_img: true,
|
||||
comment_upload_img: false,
|
||||
comment_like_s: true,
|
||||
comment_hot_threshold: 10,
|
||||
comment_quick_s: true,
|
||||
@@ -56,11 +53,9 @@ export const commentSchema = {
|
||||
},
|
||||
{
|
||||
key: 'permissions',
|
||||
title: '评论权限',
|
||||
title: '评论设置',
|
||||
icon: 'fas fa-lock',
|
||||
fields: [
|
||||
{ key: 'comment_require_login', label: '评论需要登录', type: 'switch', default: false },
|
||||
{ key: 'comment_allow_reply', label: '允许回复', type: 'switch', default: true },
|
||||
{ key: 'comment_close_comments', label: '关闭评论', type: 'switch', default: false },
|
||||
{ key: 'comment_edit_window', label: '作者自助编辑时限 (分钟)', type: 'number', default: 10, min: 0, max: 1440 },
|
||||
],
|
||||
|
||||
@@ -5,8 +5,6 @@ export const featuresSchema = {
|
||||
description: '配置用户中心和个人主页的功能模块。',
|
||||
defaults: {
|
||||
user_center_tabs: 'profile,level,posts,comments,favorites,vip,credits,revenue,auth',
|
||||
user_cover_upload: true,
|
||||
user_social_links: true,
|
||||
user_desc_std: '这家伙很懒…',
|
||||
user_city_s: true,
|
||||
user_city_type: 'province',
|
||||
@@ -25,8 +23,6 @@ export const featuresSchema = {
|
||||
icon: 'fas fa-user-shield',
|
||||
fields: [
|
||||
{ key: 'user_center_tabs', label: '用户中心 Tab', type: 'input', default: 'profile,level,comments,favorites,vip,credits,revenue,auth', help: '逗号分隔。level=我的等级;creator=创作中心;revenue=推广收益中心;auth=官方认证;等级、VIP、订单、创作中心、收益中心和认证会按功能开关自动注入' },
|
||||
{ key: 'user_cover_upload', label: '封面上传', type: 'switch', default: true },
|
||||
{ key: 'user_social_links', label: '社交链接', type: 'switch', default: true },
|
||||
{ key: 'user_desc_std', label: '默认签名', type: 'input', default: '这家伙很懒…', help: '用户未设置个人简介时显示的默认文案' },
|
||||
{ key: 'user_city_s', label: '显示城市(IP 归属地)', type: 'switch', default: true, help: '根据用户登录 IP 在用户主页与用户中心显示归属地;需同时在「扩展 → IP归属地」启用并勾选对应展示位置' },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user