支持数据授权管理功能
This commit is contained in:
@@ -26,6 +26,9 @@ const (
|
||||
scriptUsePath = "/saas/script/use"
|
||||
expListPath = "/saas/exp/list"
|
||||
expGetPath = "/saas/exp/get"
|
||||
grantListPath = "/saas/grant/list"
|
||||
grantAddPath = "/saas/grant/add"
|
||||
grantDeletePath = "/saas/grant/delete"
|
||||
)
|
||||
|
||||
type Auth struct {
|
||||
@@ -59,6 +62,9 @@ type ApiUrls struct {
|
||||
ScriptUsePath string
|
||||
ExpListPath string
|
||||
ExpGetPath string
|
||||
GrantListPath string
|
||||
GrantAddPath string
|
||||
GrantDeletePath string
|
||||
}
|
||||
|
||||
func InitAPIUrl(c *ApiUrls) *ApiUrls {
|
||||
@@ -198,5 +204,23 @@ func InitAPIUrl(c *ApiUrls) *ApiUrls {
|
||||
r.ExpGetPath = expGetPath
|
||||
}
|
||||
|
||||
if c.GrantListPath != "" {
|
||||
r.GrantListPath = c.GrantListPath
|
||||
} else {
|
||||
r.GrantListPath = grantListPath
|
||||
}
|
||||
|
||||
if c.GrantAddPath != "" {
|
||||
r.GrantAddPath = c.GrantAddPath
|
||||
} else {
|
||||
r.GrantAddPath = grantAddPath
|
||||
}
|
||||
|
||||
if c.GrantDeletePath != "" {
|
||||
r.GrantDeletePath = c.GrantDeletePath
|
||||
} else {
|
||||
r.GrantDeletePath = grantDeletePath
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user