• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Permission Extension:How to Skip Permission Interception for Functions


I. Invoking Interfaces Directly Without Login

(Ⅰ) Example:

  • Skip permission validation for queryTea
@Action(displayName = "queryTea", bindingType = ViewTypeEnum.FORM)
@Action.Advanced(type = FunctionTypeEnum.UPDATE)
public Teacher queryTea(Teacher data) {
}
  • Configure the function's namespace (model code) and function name in the YAML file:
pamirs:
  auth:
    fun-filter:
      - namespace: user.PamirsUserTransient
        fun: login # Login
      - namespace: top.Teacher
        fun: queryTea

II. Invoking Interfaces Directly with Login (Without Skipping Login)

(Ⅰ) Example:

  • Configure the function's namespace (model code) and function name in the YAML file:
pamirs:
  auth:
    fun-filter-only-login: # After login, skip permission validation for this function
      - namespace: top.Teacher
        fun: queryTea

III. Setting Permission Filters by Package

  • How to batch skip permission validation? The above two methods provide ways to configure permission filters in the YML file, but if a large number of permissions need to be filtered, configuration becomes tedious. Therefore, the following mainly introduces controlling permissions through code extension.

(Ⅰ) Example:

  • The following example skips permissions by controlling the package path.
  • Inherit the pro.shushi.pamirs.auth.api.spi.AuthFilterService interface:
@Order(88)
@Component
public class CustomAuthFilterService implements AuthFilterService {

    public static final String skipClass = "pro.shushi.pamirs.top.core.action";

    @Override
    public Boolean isAccessAction(String model, String name) {
        // Retrieve the function from the cache
        Action cacheAction = PamirsSession.getContext().getExtendCache(ActionCacheApi.class).get(model, name);
        if (cacheAction instanceof ServerAction) {
            ServerAction serverAction = (ServerAction) cacheAction;
            Function function = PamirsSession.getContext().getFunction(serverAction.getModel(), serverAction.getFun());
            String clazz = function.getClazz();
            // Return true to indicate validation passed
            if (clazz != null && clazz.startsWith(skipClass)) {
                return true;
            }
        }
        return null;
    }
}

Actions under the pro.shushi.pamirs.top.core.action path can pass validation.

Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
File Storage:OSS (CDN) Configuration and File System Operations
Next
Permission Extension:How to Delete the Default Homepage Node in System Permissions
默认页脚
Copyright © 2026 Mr.Hope