ch logika
This commit is contained in:
150
docs/docs.go
150
docs/docs.go
@@ -2445,6 +2445,12 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Conflict",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
@@ -2559,6 +2565,12 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Conflict",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
@@ -4988,109 +5000,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/permission-users": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Grants (\"allow\") or revokes (\"deny\") a permission for a specific user on top of their role, or updates the effect if the pair is already assigned",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"permission-users"
|
||||
],
|
||||
"summary": "Assign a permission override to a user",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Permission-user payload",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/permissionuser.CreatePermissionUserDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/permission-users/{id}": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Deletes a permission-user assignment, falling back to the user's role for that permission",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"permission-users"
|
||||
],
|
||||
"summary": "Remove a user's permission override",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Permission-user ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/permissions": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -7451,7 +7360,8 @@ const docTemplate = `{
|
||||
"required": [
|
||||
"address",
|
||||
"name",
|
||||
"region"
|
||||
"region",
|
||||
"uniqueCode"
|
||||
],
|
||||
"properties": {
|
||||
"active": {
|
||||
@@ -7495,6 +7405,9 @@ const docTemplate = `{
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueCode": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8554,9 +8467,6 @@ const docTemplate = `{
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -8785,9 +8695,6 @@ const docTemplate = `{
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -9228,29 +9135,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"permissionuser.CreatePermissionUserDTO": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"effect",
|
||||
"permissionId",
|
||||
"userId"
|
||||
],
|
||||
"properties": {
|
||||
"effect": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
},
|
||||
"permissionId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"province.CreateProvinceDTO": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
@@ -2439,6 +2439,12 @@
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Conflict",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
@@ -2553,6 +2559,12 @@
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Conflict",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
@@ -4982,109 +4994,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/permission-users": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Grants (\"allow\") or revokes (\"deny\") a permission for a specific user on top of their role, or updates the effect if the pair is already assigned",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"permission-users"
|
||||
],
|
||||
"summary": "Assign a permission override to a user",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Permission-user payload",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/permissionuser.CreatePermissionUserDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/permission-users/{id}": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Deletes a permission-user assignment, falling back to the user's role for that permission",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"permission-users"
|
||||
],
|
||||
"summary": "Remove a user's permission override",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Permission-user ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/permissions": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -7445,7 +7354,8 @@
|
||||
"required": [
|
||||
"address",
|
||||
"name",
|
||||
"region"
|
||||
"region",
|
||||
"uniqueCode"
|
||||
],
|
||||
"properties": {
|
||||
"active": {
|
||||
@@ -7489,6 +7399,9 @@
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueCode": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8548,9 +8461,6 @@
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -8779,9 +8689,6 @@
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -9222,29 +9129,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"permissionuser.CreatePermissionUserDTO": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"effect",
|
||||
"permissionId",
|
||||
"userId"
|
||||
],
|
||||
"properties": {
|
||||
"effect": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
},
|
||||
"permissionId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"province.CreateProvinceDTO": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
@@ -137,10 +137,13 @@ definitions:
|
||||
type: integer
|
||||
region:
|
||||
type: string
|
||||
uniqueCode:
|
||||
type: string
|
||||
required:
|
||||
- address
|
||||
- name
|
||||
- region
|
||||
- uniqueCode
|
||||
type: object
|
||||
branches.LocalizedText:
|
||||
properties:
|
||||
@@ -861,8 +864,6 @@ definitions:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
uniqueId:
|
||||
type: string
|
||||
userId:
|
||||
type: integer
|
||||
workCompany:
|
||||
@@ -1022,8 +1023,6 @@ definitions:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
uniqueId:
|
||||
type: string
|
||||
userId:
|
||||
type: integer
|
||||
workCompany:
|
||||
@@ -1346,22 +1345,6 @@ definitions:
|
||||
- permissionId
|
||||
- roleId
|
||||
type: object
|
||||
permissionuser.CreatePermissionUserDTO:
|
||||
properties:
|
||||
effect:
|
||||
enum:
|
||||
- allow
|
||||
- deny
|
||||
type: string
|
||||
permissionId:
|
||||
type: integer
|
||||
userId:
|
||||
type: integer
|
||||
required:
|
||||
- effect
|
||||
- permissionId
|
||||
- userId
|
||||
type: object
|
||||
province.CreateProvinceDTO:
|
||||
properties:
|
||||
active:
|
||||
@@ -3231,6 +3214,10 @@ paths:
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
@@ -3336,6 +3323,10 @@ paths:
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
@@ -4867,73 +4858,6 @@ paths:
|
||||
summary: Remove permission from role
|
||||
tags:
|
||||
- permission-roles
|
||||
/permission-users:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Grants ("allow") or revokes ("deny") a permission for a specific
|
||||
user on top of their role, or updates the effect if the pair is already assigned
|
||||
parameters:
|
||||
- description: Permission-user payload
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/permissionuser.CreatePermissionUserDTO'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Assign a permission override to a user
|
||||
tags:
|
||||
- permission-users
|
||||
/permission-users/{id}:
|
||||
delete:
|
||||
description: Deletes a permission-user assignment, falling back to the user's
|
||||
role for that permission
|
||||
parameters:
|
||||
- description: Permission-user ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Remove a user's permission override
|
||||
tags:
|
||||
- permission-users
|
||||
/permissions:
|
||||
get:
|
||||
description: Returns paginated permissions with optional filters
|
||||
|
||||
@@ -16,7 +16,6 @@ var swaggerTagOrder = []struct {
|
||||
{Name: "role-users", Description: "Role users"},
|
||||
{Name: "permission", Description: "Permissions"},
|
||||
{Name: "permission-roles", Description: "Permission roles"},
|
||||
{Name: "permission-users", Description: "Per-user permission overrides"},
|
||||
{Name: "payment-card", Description: "Payment cards"},
|
||||
{Name: "reason-card", Description: "Reason cards"},
|
||||
{Name: "cards", Description: "Cards"},
|
||||
|
||||
Reference in New Issue
Block a user