uuid used

This commit is contained in:
2026-02-20 15:06:15 +02:00
parent 35e83ed705
commit 8546ad496f
31 changed files with 265 additions and 238 deletions
+7 -6
View File
@@ -14,6 +14,7 @@ import (
"mstore/app/operator"
"mstore/app/router"
"mstore/pkg/auxuuid"
"mstore/pkg/terms"
)
@@ -29,7 +30,7 @@ func (hand *Handler) ManifestExists(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, auxuuid.UUID(operatorID), terms.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -71,7 +72,7 @@ func (hand *Handler) PutManifest(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightWriteImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, auxuuid.UUID(operatorID), terms.RightWriteImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -104,7 +105,7 @@ func (hand *Handler) GetManifest(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, auxuuid.UUID(operatorID), terms.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -144,7 +145,7 @@ func (hand *Handler) DeleteManifest(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightWriteImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, auxuuid.UUID(operatorID), terms.RightWriteImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -173,7 +174,7 @@ func (hand *Handler) GetReferer(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, auxuuid.UUID(operatorID), terms.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
@@ -199,7 +200,7 @@ func (hand *Handler) GetTags(rctx *router.Context) {
}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadImages, "")
opEnable, err := hand.CheckRight(rctx.Ctx, auxuuid.UUID(operatorID), terms.RightReadImages, "")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return