File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ type CasbinRule struct {
32
32
V3 string `xorm:"varchar(100) index"`
33
33
V4 string `xorm:"varchar(100) index"`
34
34
V5 string `xorm:"varchar(100) index"`
35
+ V6 string `xorm:"varchar(100) index"`
36
+ V7 string `xorm:"varchar(100) index"`
37
+ V8 string `xorm:"varchar(100) index"`
38
+ V9 string `xorm:"varchar(100) index"`
35
39
}
36
40
37
41
// Adapter represents the Xorm adapter for policy storage.
@@ -168,6 +172,18 @@ func loadPolicyLine(line CasbinRule, model model.Model) {
168
172
if line .V5 != "" {
169
173
lineText += ", " + line .V5
170
174
}
175
+ if line .V6 != "" {
176
+ lineText += ", " + line .V6
177
+ }
178
+ if line .V7 != "" {
179
+ lineText += ", " + line .V7
180
+ }
181
+ if line .V8 != "" {
182
+ lineText += ", " + line .V8
183
+ }
184
+ if line .V9 != "" {
185
+ lineText += ", " + line .V9
186
+ }
171
187
172
188
persist .LoadPolicyLine (lineText , model )
173
189
}
@@ -209,6 +225,18 @@ func savePolicyLine(ptype string, rule []string) CasbinRule {
209
225
if len (rule ) > 5 {
210
226
line .V5 = rule [5 ]
211
227
}
228
+ if len (rule ) > 6 {
229
+ line .V6 = rule [6 ]
230
+ }
231
+ if len (rule ) > 7 {
232
+ line .V7 = rule [7 ]
233
+ }
234
+ if len (rule ) > 8 {
235
+ line .V8 = rule [8 ]
236
+ }
237
+ if len (rule ) > 9 {
238
+ line .V9 = rule [9 ]
239
+ }
212
240
213
241
return line
214
242
}
You can’t perform that action at this time.
0 commit comments