From a985e6ba578b4ec28a25932f871c4df76ce092f2 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 12 五月 2026 15:02:39 +0800
Subject: [PATCH] 模块添加自定义标签鉴权 在Token启用的情况下。通过自定义标签定义的modname和Operate 判断用户是否有访问模块的权限
---
WebAPI/Controllers/XSGL/Xs_OutDoorBillController.cs | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/Xs_OutDoorBillController.cs b/WebAPI/Controllers/XSGL/Xs_OutDoorBillController.cs
index f9e8484..d900904 100644
--- a/WebAPI/Controllers/XSGL/Xs_OutDoorBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_OutDoorBillController.cs
@@ -10,9 +10,11 @@
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
+using WebAPI.Utility;
namespace WebAPI.Controllers
{
+ [Permission(HModName = "Xs_OutDoorCheckBill")]
//鍑洪棬纭鍗旵ontroller
public class Xs_OutDoorBillController : ApiController
{
@@ -33,6 +35,7 @@
/// </summary>
[Route("Xs_OutDoorBill/list")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorCheckBillList")]
public object getXs_OutDoorBill(string sWhere, string user)
{
try
@@ -92,6 +95,7 @@
/// </summary>
[Route("Xs_OutDoorBill/list_checked")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorCheckBillList")]
public object getXs_OutDoorBill_Checked(string sWhere, string user)
{
try
@@ -147,6 +151,7 @@
#region 鍑洪棬纭鍗曚繚瀛� 鏂板/缂栬緫
[Route("Xs_OutDoorBill/SaveXs_OutDoorBill")]
[HttpPost]
+ [Permission(HModName = "Xs_OutDoorCheckBill_Edit")]
public object SaveXs_OutDoorBill([FromBody] JObject msg)
{
var _value = msg["msg"].ToString();
@@ -372,6 +377,7 @@
/// </summary>
[Route("Xs_OutDoorBill/delete")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorCheckBill_Drop")]
public object deleteXs_OutDoorBill(string HInterID, string user)
{
try
@@ -508,6 +514,7 @@
/// <returns></returns>
[Route("Xs_OutDoorBill/AuditXs_OutDoorBill")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorCheckBill_Check")]
public object AuditXs_OutDoorBill(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "Xs_OutDoorCheckBill_Check";
@@ -754,6 +761,7 @@
/// <returns></returns>
[Route("Xs_OutDoorBill/CloseXs_OutDoorBill")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorCheckBill_Close")]
public object CloseXs_OutDoorBill(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "Xs_OutDoorCheckBill_Close";
@@ -899,6 +907,7 @@
/// <returns></returns>
[Route("Xs_OutDoorBill/DeleteXs_OutDoorBill")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorCheckBill_Delete")]
public object DeleteXs_OutDoorBill(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "Xs_OutDoorCheckBill_Delete";
@@ -1220,6 +1229,8 @@
#region 鍑洪棬纭鍗曟姤琛�
[Route("Xs_OutDoorBill/Xs_OutDoorBillReport")]
[HttpGet]
+ [Permission(HModName = "Xs_OutDoorBillReport")]
+
public object Xs_OutDoorBillReport(string HBeginDate, string HEndDate, string sWhere, string user,int HOperationType)
{
try
--
Gitblit v1.9.1