move registry struct definitions to dataservice/registry

Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io>
This commit is contained in:
Sven Dowideit
2022-02-23 16:21:35 +10:00
parent 1598ec47ff
commit ea0b34de72
101 changed files with 610 additions and 539 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package webhooks
import (
"github.com/portainer/portainer/api/database"
"github.com/portainer/portainer/api/dataservices"
"github.com/portainer/portainer/api/internal/authorization"
"net/http"
@@ -49,7 +50,7 @@ func (handler *Handler) checkResourceAccess(r *http.Request, resourceID string,
if rc == nil || err != nil {
return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to retrieve a resource control associated to the resource", Err: err}
}
userTeamIDs := make([]portainer.TeamID, 0)
userTeamIDs := make([]database.TeamID, 0)
for _, membership := range securityContext.UserMemberships {
userTeamIDs = append(userTeamIDs, membership.TeamID)
}