Search in sources :

Example 1 with PermissionValidator

use of com.ctrip.framework.apollo.portal.component.PermissionValidator in project apollo by ctripcorp.

the class SkipAuthorizationConfiguration method permissionValidator.

@Primary
@Bean("permissionValidator")
public PermissionValidator permissionValidator() {
    final PermissionValidator mock = mock(PermissionValidator.class);
    when(mock.isSuperAdmin()).thenReturn(true);
    return mock;
}
Also used : PermissionValidator(com.ctrip.framework.apollo.portal.component.PermissionValidator) 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 PermissionValidator (com.ctrip.framework.apollo.portal.component.PermissionValidator)1 Bean (org.springframework.context.annotation.Bean)1 Primary (org.springframework.context.annotation.Primary)1