diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 467f419bb..268784adc 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -936,20 +936,6 @@ var doc = `{ } } }, - "/auth/status": { - "get": { - "description": "判断是否为首次登录", - "tags": [ - "Auth" - ], - "summary": "Check is First login", - "responses": { - "200": { - "description": "" - } - } - } - }, "/containers": { "post": { "security": [ @@ -8151,6 +8137,57 @@ var doc = `{ } } }, + "/websites/dir/permission": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站目录权限", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update Site Dir permission", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteUpdateDirPermission" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Update domain [domain] dir permission", + "formatZH": "更新网站 [domain] 目录权限", + "paramKeys": [] + } + } + }, "/websites/dir/update": { "post": { "security": [ @@ -8179,7 +8216,7 @@ var doc = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -12013,6 +12050,9 @@ var doc = `{ "expireDate": { "type": "string" }, + "group": { + "type": "string" + }, "httpConfig": { "type": "string" }, @@ -12052,6 +12092,9 @@ var doc = `{ "updatedAt": { "type": "string" }, + "user": { + "type": "string" + }, "webSiteGroupId": { "type": "integer" }, @@ -13257,6 +13300,25 @@ var doc = `{ } } }, + "request.WebsiteUpdateDirPermission": { + "type": "object", + "required": [ + "group", + "id", + "user" + ], + "properties": { + "group": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + }, "request.WebsiteWafReq": { "type": "object", "required": [ @@ -13643,6 +13705,9 @@ var doc = `{ "expireDate": { "type": "string" }, + "group": { + "type": "string" + }, "httpConfig": { "type": "string" }, @@ -13688,6 +13753,9 @@ var doc = `{ "updatedAt": { "type": "string" }, + "user": { + "type": "string" + }, "webSiteGroupId": { "type": "integer" }, diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index e5bf19d11..23238aa39 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -922,20 +922,6 @@ } } }, - "/auth/status": { - "get": { - "description": "判断是否为首次登录", - "tags": [ - "Auth" - ], - "summary": "Check is First login", - "responses": { - "200": { - "description": "" - } - } - } - }, "/containers": { "post": { "security": [ @@ -8137,6 +8123,57 @@ } } }, + "/websites/dir/permission": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新网站目录权限", + "consumes": [ + "application/json" + ], + "tags": [ + "Website" + ], + "summary": "Update Site Dir permission", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteUpdateDirPermission" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "websites", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "Update domain [domain] dir permission", + "formatZH": "更新网站 [domain] 目录权限", + "paramKeys": [] + } + } + }, "/websites/dir/update": { "post": { "security": [ @@ -8165,7 +8202,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -11999,6 +12036,9 @@ "expireDate": { "type": "string" }, + "group": { + "type": "string" + }, "httpConfig": { "type": "string" }, @@ -12038,6 +12078,9 @@ "updatedAt": { "type": "string" }, + "user": { + "type": "string" + }, "webSiteGroupId": { "type": "integer" }, @@ -13243,6 +13286,25 @@ } } }, + "request.WebsiteUpdateDirPermission": { + "type": "object", + "required": [ + "group", + "id", + "user" + ], + "properties": { + "group": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + }, "request.WebsiteWafReq": { "type": "object", "required": [ @@ -13629,6 +13691,9 @@ "expireDate": { "type": "string" }, + "group": { + "type": "string" + }, "httpConfig": { "type": "string" }, @@ -13674,6 +13739,9 @@ "updatedAt": { "type": "string" }, + "user": { + "type": "string" + }, "webSiteGroupId": { "type": "integer" }, diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 3636005d7..5ec58923b 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -1730,6 +1730,8 @@ definitions: type: boolean expireDate: type: string + group: + type: string httpConfig: type: string id: @@ -1756,6 +1758,8 @@ definitions: type: string updatedAt: type: string + user: + type: string webSiteGroupId: type: integer webSiteSSL: @@ -2562,6 +2566,19 @@ definitions: - id - siteDir type: object + request.WebsiteUpdateDirPermission: + properties: + group: + type: string + id: + type: integer + user: + type: string + required: + - group + - id + - user + type: object request.WebsiteWafReq: properties: key: @@ -2818,6 +2835,8 @@ definitions: type: string expireDate: type: string + group: + type: string httpConfig: type: string id: @@ -2848,6 +2867,8 @@ definitions: type: string updatedAt: type: string + user: + type: string webSiteGroupId: type: integer webSiteSSL: @@ -3481,15 +3502,6 @@ paths: summary: User login with mfa tags: - Auth - /auth/status: - get: - description: 判断是否为首次登录 - responses: - "200": - description: "" - summary: Check is First login - tags: - - Auth /containers: post: consumes: @@ -8069,6 +8081,39 @@ paths: formatEN: Delete website [domain] formatZH: 删除网站 [domain] paramKeys: [] + /websites/dir/permission: + post: + consumes: + - application/json + description: 更新网站目录权限 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/request.WebsiteUpdateDirPermission' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Update Site Dir permission + tags: + - Website + x-panel-log: + BeforeFuntions: + - db: websites + input_colume: id + input_value: id + isList: false + output_colume: primary_domain + output_value: domain + bodyKeys: + - id + formatEN: Update domain [domain] dir permission + formatZH: 更新网站 [domain] 目录权限 + paramKeys: [] /websites/dir/update: post: consumes: @@ -8083,7 +8128,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdateDir' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update Site Dir diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 24835ff52..3f1739352 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -853,8 +853,9 @@ const message = { safe: 'Security', safeEntrance: 'Security entrance', - safeEntranceHelper: - 'Panel management portal. You can log in to the panel only through a specified security portal, for example: onepanel', + entranceHelper: 'Enabling secure entry will only allow logging in to the panel through specified secure entry.', + entranceError: + 'Please enter a secure login entry point of 6-10 characters, only numbers or letters are supported.', expirationTime: 'Expiration Time', unSetting: 'Not Set', noneSetting: diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index c09eccb65..42bf6ffa4 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -803,7 +803,7 @@ const message = { portChangeHelper: '服务端口修改需要重启服务,是否继续?', entrance: '安全入口', entranceHelper: '开启安全入口后只能通过指定安全入口登录面板', - entranceError: '请输入 8 位安全登录入口,仅支持输入数字或字母', + entranceError: '请输入 6-10 位安全登录入口,仅支持输入数字或字母', theme: '主题颜色', componentSize: '组件大小', dark: '暗色', diff --git a/frontend/src/views/setting/safe/index.vue b/frontend/src/views/setting/safe/index.vue index fa31fdd01..2c44da8a3 100644 --- a/frontend/src/views/setting/safe/index.vue +++ b/frontend/src/views/setting/safe/index.vue @@ -36,7 +36,7 @@ type="password" show-password clearable - v-model.number="form.securityEntrance" + v-model="form.securityEntrance" >