Browse Source

perm: add GetSubjectsFunc GetContextFunc methods

xuxin 1 year ago
parent
commit
c906cb27b7
1 changed files with 8 additions and 0 deletions
  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