groups: add role placeholder

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-03-12 18:21:50 +01:00
parent ca2757d41e
commit 26d3105f54
3 changed files with 20 additions and 13 deletions

View File

@@ -1695,7 +1695,7 @@ func (u *User) LoadAndApplyGroupSettings() error {
}
func (u *User) getGroupPlacehodersReplacer() *strings.Replacer {
return strings.NewReplacer("%username%", u.Username)
return strings.NewReplacer("%username%", u.Username, "%role%", u.Role)
}
func (u *User) replacePlaceholder(value string, replacer *strings.Replacer) string {