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/SCGL/Gy_SourceWorkStationSetController.cs | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs b/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs
index 2c68baf..0185f52 100644
--- a/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs
+++ b/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs
@@ -8,9 +8,11 @@
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
+using WebAPI.Utility;
namespace WebAPI.Controllers
{
+ [Permission(HModName = "Gy_SourceWorkStationSet")]
public class Gy_SourceWorkStationSetController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -26,6 +28,7 @@
/// </summary>
[Route("Gy_SourceWorkStationSet/list")]
[HttpGet]
+ [Permission(HModName = "Gy_SourceWorkStationSet", Operate = "_Query")]
public object list(string sWhere, string user)
{
try
@@ -79,6 +82,7 @@
#region 浜х嚎宸ヤ綅淇濆瓨
[Route("Gy_SourceWorkStationSet/Save")]
[HttpPost]
+ [Permission(HModName = "Gy_SourceWorkStationSet", Operate = "_Edit")]
public object set_SaveBill([FromBody] JObject oMain)
{
var _value = oMain["oMain"].ToString();
@@ -177,6 +181,7 @@
/// <returns></returns>
[Route("DeltetGy_SourceWorkStation")]
[HttpGet]
+ [Permission(HModName = "Gy_SourceWorkStationSet", Operate = "_Del")]
public object DeltetGy_SourceWorkStation(string HItemID, string user)
{
DataSet ds;
--
Gitblit v1.9.1