[management] Add managers to link networks API with store (#3022)

This commit is contained in:
Pascal Fischer
2024-12-12 11:51:44 +01:00
committed by GitHub
parent 7944b8e843
commit d1d6875953
20 changed files with 582 additions and 54 deletions

View File

@ -169,3 +169,12 @@ func NewNetworkRouterNotFoundError(routerID string) error {
func NewNetworkResourceNotFoundError(resourceID string) error {
return Errorf(NotFound, "network resource: %s not found", resourceID)
}
// NewPermissionDeniedError creates a new Error with PermissionDenied type for a permission denied error.
func NewPermissionDeniedError() error {
return Errorf(PermissionDenied, "permission denied")
}
func NewPermissionValidationError(err error) error {
return Errorf(PermissionDenied, "failed to vlidate user permissions: %s", err)
}