Skip to content

Commit c1715e3

Browse files
authored
🐛 fix: update permission path in AddPermissionForUser method (#269)
1 parent 8226866 commit c1715e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apis/role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (e *Role) SetAuthorize(ctx *gin.Context) {
151151
continue
152152
}
153153
_, err = gormdb.Enforcer.AddPermissionForUser(
154-
req.RoleID, pkg.APIAccessType.String(), menus[i].Children[j].Name, menus[i].Children[j].Method)
154+
req.RoleID, pkg.APIAccessType.String(), menus[i].Children[j].Path, menus[i].Children[j].Method)
155155
if err != nil {
156156
api.AddError(err).Log.
157157
Error("add api permission for role error",

0 commit comments

Comments
 (0)