浏览代码

perm: add GetSubjectsFunc GetContextFunc methods

xuxin 1 年之前
父节点
当前提交
c906cb27b7
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      perm/builder.go

+ 8 - 0
perm/builder.go

@@ -139,11 +139,19 @@ func (b *Builder) SubjectsFunc(v SubjectsFunc) (r *Builder) {
 	return b
 }
 
+func (b *Builder) GetSubjectsFunc() SubjectsFunc {
+	return b.subjectsFunc
+}
+
 func (b *Builder) ContextFunc(v ContextFunc) (r *Builder) {
 	b.contextFunc = v
 	return b
 }
 
+func (b *Builder) GetContextFunc() ContextFunc {
+	return b.contextFunc
+}
+
 func (b *Builder) DBPolicy(dpb *DBPolicyBuilder) (r *Builder) {
 	b.dbPolicy = dpb