mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Updated user attribute replace <Tag> <UserReplacement> to allow field:photourl
This commit is contained in:
@@ -4858,8 +4858,11 @@ gam <UserTypeEntity> show teamdriveacls
|
||||
relation.<RelationSubfieldName>.<RelationSubfieldName>.<String>|
|
||||
sshkeys.<SSHkeysSubfieldName>.<SSHkeysSubfieldName>.<String>|
|
||||
website.<WebsiteSubfieldName>.<WebsiteSubfieldName>.<String>
|
||||
<UserReplacementField> ::=
|
||||
photourl
|
||||
<Tag> ::= <String>
|
||||
<UserReplacement> ::=
|
||||
(field:<UserReplacementField>)|
|
||||
(field:<UserReplacementFieldSubfield>)|
|
||||
(field:<UserReplacementFieldSubfieldMatchSubfield>)|
|
||||
(schema:<SchemaName>.<FieldName>)|
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.67.04
|
||||
|
||||
Updated user attribute `replace <Tag> <UserReplacement>` to allow `field:photourl` which allows
|
||||
embedding a link to a user's photo in their signature. Formatting the signature HTML
|
||||
to properly display the photo is left to the GAM admin.
|
||||
|
||||
6.67.03
|
||||
|
||||
Fixed bug introduced in 6.67.02 in `gam <UserTypeEntity> claim ownership` that caused a trap.
|
||||
|
||||
@@ -5751,7 +5751,7 @@ def shlexSplitListStatus(entity, dataDelimiter=' ,'):
|
||||
return (False, str(e))
|
||||
|
||||
def getQueries(myarg):
|
||||
if myarg == 'query':
|
||||
if myarg in {'query', 'filter'}:
|
||||
return [getString(Cmd.OB_QUERY)]
|
||||
return shlexSplitList(getString(Cmd.OB_QUERY_LIST))
|
||||
|
||||
@@ -13971,6 +13971,7 @@ TAG_FIELD_SUBFIELD_CHOICE_MAP = {
|
||||
'otheremails': ('emails', TAG_OTHEREMAIL_ARGUMENT_TO_FIELD_MAP),
|
||||
'phone': ('phones', TAG_PHONE_ARGUMENT_TO_FIELD_MAP),
|
||||
'phones': ('phones', TAG_PHONE_ARGUMENT_TO_FIELD_MAP),
|
||||
'photourl': ('thumbnailPhotoUrl', {'': 'thumbnailPhotoUrl'}),
|
||||
'posix': ('posixAccounts', TAG_POSIXACCOUNT_ARGUMENT_TO_FIELD_MAP),
|
||||
'posixaccounts': ('posixAccounts', TAG_POSIXACCOUNT_ARGUMENT_TO_FIELD_MAP),
|
||||
'relation': ('relations', TAG_RELATION_ARGUMENT_TO_FIELD_MAP),
|
||||
@@ -14014,6 +14015,8 @@ def _getTagReplacement(tagReplacements, allowSubs):
|
||||
else:
|
||||
Cmd.Backup()
|
||||
usageErrorExit(Msg.INVALID_TAG_SPECIFICATION)
|
||||
elif field == 'photourl':
|
||||
subfield = matchfield = matchvalue = ''
|
||||
else:
|
||||
field = ''
|
||||
if not field or field not in TAG_FIELD_SUBFIELD_CHOICE_MAP:
|
||||
@@ -14128,6 +14131,8 @@ def _getTagReplacementFieldValues(user, i, count, tagReplacements, results=None)
|
||||
break
|
||||
else:
|
||||
data = {}
|
||||
elif field == 'thumbnailPhotoUrl':
|
||||
data = results
|
||||
else:
|
||||
data = results.get(field, {})
|
||||
tag['value'] = str(data.get(tag['subfield'], ''))
|
||||
|
||||
Reference in New Issue
Block a user