|
@@ -67,7 +67,6 @@ func (m *AuthorityMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
|
|
|
}
|
|
|
// 将 data.DepartmentID 插入上下文,以供后续接口使用
|
|
|
//fmt.Printf("---------------departmentId----------------: %d\n\n", *data.DepartmentId)
|
|
|
- r = r.WithContext(context.WithValue(r.Context(), "userIdStr", userIdStr))
|
|
|
r = r.WithContext(context.WithValue(r.Context(), "organizationId", *data.DepartmentId))
|
|
|
r = r.WithContext(context.WithValue(r.Context(), "isAdmin", stringInSlice(roleIds, []string{"001"})))
|
|
|
next(w, r)
|