FIX: 修复订阅大盘图表 (#461)
* FIX: 修复短信报警模板的转义问题 报警说明里的信息由于 html template 的转义,会将部分字符转义为 html 表示,但是短信内容不需要转义。 向 template 模板添加 unescaped 处理函数,并在模板文件中使用 unescaped 标识不需要转义的字段,实现避免转义 * FIX: html template func 需要在 phase 之前添加 * FIX: use the filename as template name * FIX: template name * FIX: 修复订阅大盘图表 Co-authored-by: zhupeiyuan <zhupeiyuan@fenbi.com>
This commit is contained in:
parent
37c8317410
commit
d6d2e32b2e
|
@ -20,7 +20,7 @@ func chartPost(c *gin.Context) {
|
|||
errors.Dangerous(c.ShouldBind(&f))
|
||||
|
||||
screen := mustScreen(subclass.ScreenId)
|
||||
can, err := models.UsernameCandoNodeOp(loginUsername(c), "mon_screen_write", screen.NodeId)
|
||||
can, err := models.UsernameCandoNodeOp(loginUsername(c), "mon_screen_modify", screen.NodeId)
|
||||
errors.Dangerous(err)
|
||||
if !can {
|
||||
bomb("permission deny")
|
||||
|
@ -111,6 +111,6 @@ func chartDel(c *gin.Context) {
|
|||
func canWriteChart(subclassId int64, username string) (bool, error) {
|
||||
subclass, err := models.ScreenSubclassGet("id", subclassId)
|
||||
screen := mustScreen(subclass.ScreenId)
|
||||
can, err := models.UsernameCandoNodeOp(username, "mon_screen_write", screen.NodeId)
|
||||
can, err := models.UsernameCandoNodeOp(username, "mon_screen_modify", screen.NodeId)
|
||||
return can, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue