Search in sources :

Example 1 with ConsumerPermissionValidator

use of com.ctrip.framework.apollo.openapi.auth.ConsumerPermissionValidator in project apollo by ctripcorp.

the class SkipAuthorizationConfiguration method consumerPermissionValidator.

@Primary
@Bean
public ConsumerPermissionValidator consumerPermissionValidator() {
    final ConsumerPermissionValidator mock = mock(ConsumerPermissionValidator.class);
    when(mock.hasCreateNamespacePermission(any(), any())).thenReturn(true);
    return mock;
}
Also used : ConsumerPermissionValidator(com.ctrip.framework.apollo.openapi.auth.ConsumerPermissionValidator) Primary(org.springframework.context.annotation.Primary) Bean(org.springframework.context.annotation.Bean)

Aggregations

ConsumerPermissionValidator (com.ctrip.framework.apollo.openapi.auth.ConsumerPermissionValidator)1 Bean (org.springframework.context.annotation.Bean)1 Primary (org.springframework.context.annotation.Primary)1