working commit

This commit is contained in:
2026-02-19 23:51:58 +02:00
parent 7f7e4706d6
commit e06ea41fbb
6 changed files with 186 additions and 35 deletions
+13
View File
@@ -177,6 +177,13 @@ func (hand *Handler) ListFiles(rctx *router.Context) {
params := &operator.ListFilesParams{
Filepath: filepath,
}
err := rctx.BindQuery(params)
if err != nil {
hand.logg.Errorf("ListFiles binding error: %v", err)
rctx.SetStatus(http.StatusInternalServerError)
return
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadFiles, "")
@@ -208,6 +215,12 @@ func (hand *Handler) ListCollections(rctx *router.Context) {
params := &operator.ListCollectionsParams{
Path: cpath,
}
err := rctx.BindQuery(params)
if err != nil {
hand.logg.Errorf("ListCollections binding error: %v", err)
rctx.SetStatus(http.StatusInternalServerError)
return
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadFiles, "")