潘志宝
2024-11-11 aa1aa68141e3ee33f98cdd785ddc5c244fedc592
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.iailab.framework.datapermission.core.rule.dept;
 
/**
 * {@link DeptDataPermissionRule} 的自定义配置接口
 *
 * @author iailab
 */
@FunctionalInterface
public interface DeptDataPermissionRuleCustomizer {
 
    /**
     * 自定义该权限规则
     * 1. 调用 {@link DeptDataPermissionRule#addDeptColumn(Class, String)} 方法,配置基于 dept_id 的过滤规则
     * 2. 调用 {@link DeptDataPermissionRule#addUserColumn(Class, String)} 方法,配置基于 user_id 的过滤规则
     *
     * @param rule 权限规则
     */
    void customize(DeptDataPermissionRule rule);
 
}