working commit

This commit is contained in:
2026-02-21 12:31:39 +02:00
parent 3220e2d78f
commit cd37a4508c
37 changed files with 354 additions and 319 deletions
+6 -7
View File
@@ -15,7 +15,6 @@ import (
"mstore/app/operator"
"mstore/app/router"
"mstore/pkg/term"
"mstore/pkg/auxid"
)
func (hand *Handler) ManifestExists(rctx *router.Context) {
@@ -30,7 +29,7 @@ func (hand *Handler) ManifestExists(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, uint64(operatorID), term.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, term.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -72,7 +71,7 @@ func (hand *Handler) PutManifest(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, uint64(operatorID), term.RightWriteImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, term.RightWriteImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -105,7 +104,7 @@ func (hand *Handler) GetManifest(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, uint64(operatorID), term.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, term.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -145,7 +144,7 @@ func (hand *Handler) DeleteManifest(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, uint64(operatorID), term.RightWriteImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, term.RightWriteImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -174,7 +173,7 @@ func (hand *Handler) GetReferer(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, uint64(operatorID), term.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, term.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -200,7 +199,7 @@ func (hand *Handler) GetTags(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, uint64(operatorID), term.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, term.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return