Skip to content

Commit

Permalink
Merge pull request from GHSA-2gvw-w6fj-7m3c
Browse files Browse the repository at this point in the history
Signed-off-by: pashakostohrys <[email protected]>
  • Loading branch information
pasha-codefresh authored Apr 15, 2024
1 parent d504d2b commit c514105
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 103 deletions.
18 changes: 18 additions & 0 deletions pkg/apis/application/v1alpha1/app_project_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
)

type ErrApplicationNotAllowedToUseProject struct {
application string
namespace string
project string
}

func NewErrApplicationNotAllowedToUseProject(application, namespace, project string) error {
return &ErrApplicationNotAllowedToUseProject{
application: application,
namespace: namespace,
project: project,
}
}

func (err *ErrApplicationNotAllowedToUseProject) Error() string {
return fmt.Sprintf("application '%s' in namespace '%s' is not allowed to use project %s", err.application, err.namespace, err.project)
}

// AppProjectList is list of AppProject resources
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppProjectList struct {
Expand Down
Loading

0 comments on commit c514105

Please sign in to comment.