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/YS_ReceiveOtherBillController.cs | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
index c7e73f0..b71f58a 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
@@ -8,9 +8,11 @@
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
+using WebAPI.Utility;
namespace WebAPI.Controllers
{
+ [Permission(HModName = "YS_ReceiveOtherBillMain")]
//鍏朵粬搴旀敹鍗旵ontroller
public class YS_ReceiveOtherBillController : ApiController
{
@@ -33,6 +35,7 @@
/// </summary>
[Route("YS_ReceiveOtherBill/YS_ReceiveOtherBillMainList")]
[HttpGet]
+ [Permission(HModName = "YS_ReceiveOtherBillMain_Query")]
public object YS_ReceiveOtherBillMainList(string sWhere, string user)
{
try
@@ -88,6 +91,7 @@
#region 鍏朵粬搴旀敹鍗曚繚瀛� 鏂板/缂栬緫
[Route("YS_ReceiveOtherBill/SaveYS_ReceiveOtherBillMain")]
[HttpPost]
+ [Permission(HModName = "YS_ReceiveOtherBillMain_Edit")]
public object SaveYS_ReceiveOtherBillMain([FromBody] JObject msg)
{
var _value = msg["msg"].ToString();
@@ -310,6 +314,7 @@
/// </summary>
[Route("YS_ReceiveOtherBill/DeleteYS_ReceiveOtherBillMain")]
[HttpGet]
+ [Permission(HModName = "YS_ReceiveOtherBillMain_Drop")]
public object DeleteYS_ReceiveOtherBillMain(string HInterID, string user)
{
try
@@ -457,6 +462,7 @@
/// <returns></returns>
[Route("YS_ReceiveOtherBill/AuditYS_ReceiveOtherBillMain")]
[HttpGet]
+ [Permission(HModName = "YS_ReceiveOtherBillMain_Check")]
public object AuditYS_ReceiveOtherBillMain(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "YS_ReceiveOtherBillMain_Check";
@@ -692,6 +698,7 @@
/// <returns></returns>
[Route("YS_ReceiveOtherBill/CloseYS_ReceiveOtherBill")]
[HttpGet]
+ [Permission(HModName = "YS_ReceiveOtherBill_Close")]
public object CloseYS_ReceiveOtherBill(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "YS_ReceiveOtherBill_Close";
@@ -837,6 +844,7 @@
/// <returns></returns>
[Route("YS_ReceiveOtherBill/DeleteYS_ReceiveOtherBill")]
[HttpGet]
+ [Permission(HModName = "YS_ReceiveOtherBill_Delete")]
public object DeleteYS_ReceiveOtherBill(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "YS_ReceiveOtherBill_Delete";
--
Gitblit v1.9.1