mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
EventManager: breaking change for placeholder names
Placeholder names must now be in the format:
{{.VirtualPath}}
instead of:
{{.VirtualPath}}
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1182,18 +1182,18 @@ func TestOIDCEvMgrIntegration(t *testing.T) {
|
||||
// add a special chars to check json replacer
|
||||
username := `test_"oidc_eventmanager`
|
||||
u := map[string]any{
|
||||
"username": "{{Name}}",
|
||||
"username": "{{.Name}}",
|
||||
"status": 1,
|
||||
"home_dir": filepath.Join(os.TempDir(), "{{IDPFieldcustom1.sub}}"),
|
||||
"home_dir": filepath.Join(os.TempDir(), "{{.IDPFieldcustom1.sub}}"),
|
||||
"permissions": map[string][]string{
|
||||
"/": {dataprovider.PermAny},
|
||||
},
|
||||
"description": "{{IDPFieldcustom2}}",
|
||||
"description": "{{.IDPFieldcustom2}}",
|
||||
}
|
||||
userTmpl, err := json.Marshal(u)
|
||||
require.NoError(t, err)
|
||||
a := map[string]any{
|
||||
"username": "{{Name}}",
|
||||
"username": "{{.Name}}",
|
||||
"status": 1,
|
||||
"permissions": []string{dataprovider.PermAdminAny},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user