mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
c9dcfafc68
commit
4e9b0bc6c6
5 changed files with 15 additions and 5 deletions
|
|
@ -324,9 +324,7 @@ func CheckAuth(c *gin.Context) {
|
|||
}
|
||||
|
||||
func CheckAdminRole(c *gin.Context) {
|
||||
if IsValidRole(GetGinContextRole(c), []Role{
|
||||
RoleAdministrator,
|
||||
}) {
|
||||
if IsAdminRoleContext(c) {
|
||||
c.Next()
|
||||
} else {
|
||||
c.AbortWithStatus(http.StatusForbidden)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue