package com.njzscloud.common.security.permission;

import com.njzscloud.common.security.contant.EndpointAccessModel;

import java.util.Collections;
import java.util.List;

/**
 * 默认权限管理器<br/>
 * 所有接口都必须登录后才能访问
 */
public class DefaultPermissionManager extends PermissionManager {

    private final List<RolePermission> DEFAULT_ROLE_PERMISSIONS = Collections.singletonList(
            new RolePermission()
                    .setEndpoint("/**")
                    .setAccessModel(EndpointAccessModel.LOGINED)
    );

    @Override
    protected List<RolePermission> load() {
        return DEFAULT_ROLE_PERMISSIONS;
    }
}
