Skip to content

Commit

Permalink
do not append »(SAML)« suffix to display names
Browse files Browse the repository at this point in the history
- change compared to before that may confuse end users
- technical term unnecessary to display to non-technical users
- would only suit LTR languages

Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Nov 7, 2022
1 parent 608ad31 commit 1055402
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/GroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,10 @@ public function createGroup(string $gid, string $samlGid = null): bool {
try {
// Add group
$builder = $this->dbc->getQueryBuilder();
$displayName = $samlGid ? $gid . ' (SAML)' : $gid;
$samlGid = $samlGid ?? $gid;
$result = $builder->insert(self::TABLE_GROUPS)
->setValue('gid', $builder->createNamedParameter($gid))
->setValue('displayname', $builder->createNamedParameter($displayName))
->setValue('displayname', $builder->createNamedParameter($samlGid))
->setValue('saml_gid', $builder->createNamedParameter($samlGid))
->executeStatement();
} catch (UniqueConstraintViolationException $e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/GroupManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ public function addGroups(IUser $user, $groupIds): void {
public function addGroup(IUser $user, string $gid): void {
try {
$group = $this->findGroup($gid);
} catch(GroupNotFoundException $e) {
} catch (GroupNotFoundException $e) {
$group = $this->createGroupInBackend($gid);
} catch (NonMigratableGroupException $e) {
//FIXME: probably need config flag. Previous to 17, gid was used as displayname
$providerId = $this->settings->getProviderId();
$settings = $this->settings->get($providerId);
$groupPrefix = $settings['saml-attribute-mapping-group_mapping_prefix'] ?? SAMLSettings::DEFAULT_GROUP_PREFIX;
Expand Down

0 comments on commit 1055402

Please sign in to comment.