rm -rf permission module
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
2026-09-19 02:40:38 +05:00
parent c6b9cb7462
commit 848a07324f
10 changed files with 193 additions and 119 deletions

View File

@@ -1364,14 +1364,16 @@ definitions:
- module
- name
type: object
permissionrole.CreatePermissionRoleDTO:
permissionrole.SetRolePermissionsDTO:
properties:
permissionId:
type: integer
permissionIds:
items:
type: integer
type: array
roleId:
type: integer
required:
- permissionId
- permissionIds
- roleId
type: object
province.CreateProvinceDTO:
@@ -4941,39 +4943,6 @@ paths:
summary: Update payment settings
tags:
- payment-settings
/permission-roles:
post:
consumes:
- application/json
description: Creates a permission-role assignment, or updates the existing pair
if already assigned
parameters:
- description: Permission-role payload
in: body
name: body
required: true
schema:
$ref: '#/definitions/permissionrole.CreatePermissionRoleDTO'
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 permission to role
tags:
- permission-roles
/permission-roles/{id}:
delete:
description: Deletes a permission-role assignment
@@ -5007,6 +4976,40 @@ paths:
summary: Remove permission from role
tags:
- permission-roles
/permission-roles/bulk:
post:
consumes:
- application/json
description: Replaces roleId's whole permission set with permissionIds - pairs
not listed are removed, missing ones are added, an empty list clears all permissions
from the role
parameters:
- description: Role + the permission IDs it should have
in: body
name: body
required: true
schema:
$ref: '#/definitions/permissionrole.SetRolePermissionsDTO'
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: Set a role's permissions
tags:
- permission-roles
/permissions:
get:
description: Returns paginated permissions with optional filters