新增按钮权限,增加redis可独立配置 (#923)

* fix jwt to golang-jwt, gin to 1.7.0

* 增加按钮权限功能

* 增加redis可独立配置

Co-authored-by: helight <helight@helight.info>
This commit is contained in:
奇淼(piexlmax
2022-02-22 00:26:21 +08:00
committed by GitHub
parent f389ff701a
commit 6a97f39f66
33 changed files with 5024 additions and 542 deletions

View File

@@ -119,6 +119,10 @@ func (a *api) Initialize() error {
{ApiGroup: "excel", Method: "GET", Path: "/excel/loadExcel", Description: "下载excel"},
{ApiGroup: "excel", Method: "POST", Path: "/excel/exportExcel", Description: "导出excel"},
{ApiGroup: "excel", Method: "GET", Path: "/excel/downloadTemplate", Description: "下载excel模板"},
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/setAuthorityBtn", Description: "设置按钮权限"},
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/getAuthorityBtn", Description: "获取已有按钮权限"},
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/canRemoveAuthorityBtn", Description: "删除按钮"},
}
if err := global.GVA_DB.Create(&entities).Error; err != nil {
return errors.Wrap(err, a.TableName()+"表数据初始化失败!")

View File

@@ -120,6 +120,10 @@ func (c *casbin) Initialize() error {
{PType: "p", V0: "888", V1: "/excel/exportExcel", V2: "POST"},
{PType: "p", V0: "888", V1: "/excel/downloadTemplate", V2: "GET"},
{PType: "p", V0: "888", V1: "/authorityBtn/setAuthorityBtn", V2: "POST"},
{PType: "p", V0: "888", V1: "/authorityBtn/getAuthorityBtn", V2: "POST"},
{PType: "p", V0: "888", V1: "/authorityBtn/canRemoveAuthorityBtn", V2: "POST"},
{PType: "p", V0: "8881", V1: "/base/login", V2: "POST"},
{PType: "p", V0: "8881", V1: "/user/register", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/createApi", V2: "POST"},