mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:07:32 +00:00

# Which Problems Are Solved This PR *partially* addresses #9450 . Specifically, it implements the resource based API for app keys. This PR, together with https://github.com/zitadel/zitadel/pull/10077 completes #9450 . # How the Problems Are Solved - Implementation of the following endpoints: `CreateApplicationKey`, `DeleteApplicationKey`, `GetApplicationKey`, `ListApplicationKeys` - `ListApplicationKeys` can filter by project, app or organization ID. Sorting is also possible according to some criteria. - All endpoints use permissions V2 # TODO - [x] Deprecate old endpoints # Additional Context Closes #9450
23 lines
570 B
Go
23 lines
570 B
Go
package permissionmock
|
|
|
|
import (
|
|
"golang.org/x/net/context"
|
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
)
|
|
|
|
// MockPermissionCheckErr returns a permission check function that will fail
|
|
// and return the input error
|
|
func MockPermissionCheckErr(err error) domain.PermissionCheck {
|
|
return func(_ context.Context, _, _, _ string) error {
|
|
return err
|
|
}
|
|
}
|
|
|
|
// MockPermissionCheckOK returns a permission check function that will succeed
|
|
func MockPermissionCheckOK() domain.PermissionCheck {
|
|
return func(_ context.Context, _, _, _ string) (err error) {
|
|
return nil
|
|
}
|
|
}
|