Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@
$userAccount = $this->accountManager->getAccount($targetUserObject);
$groups = $this->groupManager->getUserGroups($targetUserObject);
$gids = [];
$gidsDisplayName = [];
foreach ($groups as $group) {
$gids[] = $group->getGID();
$gidsDisplayName[] = ['id' => $group->getGID(), 'displayname' => $group->getDisplayName()];
}

if ($isAdmin || $isDelegatedAdmin) {
Expand Down Expand Up @@ -186,6 +188,7 @@
}

$data['groups'] = $gids;
$data['groupsWithDisplayname'] = $gidsDisplayName;
$data[self::USER_FIELD_LANGUAGE] = $this->l10nFactory->getUserLanguage($targetUserObject);
$data[self::USER_FIELD_LOCALE] = $this->config->getUserValue($targetUserObject->getUID(), 'core', 'locale');
$data[self::USER_FIELD_TIMEZONE] = $this->config->getUserValue($targetUserObject->getUID(), 'core', 'timezone');
Expand All @@ -197,7 +200,7 @@
'setPassword' => $backend instanceof ISetPasswordBackend || $backend->implementsActions(Backend::SET_PASSWORD),
];

return $data;

Check failure on line 203 in apps/provisioning_api/lib/Controller/AUserDataOCSController.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

InvalidReturnStatement

apps/provisioning_api/lib/Controller/AUserDataOCSController.php:203:10: InvalidReturnStatement: The inferred type 'array{'display-name': string, additional_mail: list<lowercase-string>, additional_mailScope?: list<'v2-federated'|'v2-local'|'v2-private'|'v2-published'>, address: string, addressScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', avatarScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', backend: string, backendCapabilities: array{setDisplayName: bool, setPassword: bool}, biography: string, biographyScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', bluesky: string, blueskyScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', displayname: string, displaynameScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', email: null|string, emailScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', enabled?: bool, fediverse: string, fediverseScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', firstLoginTimestamp: int, groups: list<string>, groupsWithDisplayname: list<array{displayname: string, id: string}>, headline: string, headlineScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', id: string, language: string, lastLogin: int, lastLoginTimestamp: int, locale: string, manager: string, notify_email: null|string, organisation: string, organisationScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', phone: string, phoneScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', profile_enabled: string, profile_enabledScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', pronouns: string, pronounsScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', quota: array{free?: float|int, quota?: float|int|string, relative?: float|int, total?: float|int, used?: float|int}, role: string, roleScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', storageLocation?: string, subadmin: list<string>, timezone: string, twitter: string, twitterScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', website: string, websiteScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published'}' does not match the declared return type 'array{'display-name': string, additional_mail: list<string>, additional_mailScope?: list<'v2-federated'|'v2-local'|'v2-private'|'v2-published'>, address: string, addressScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', avatarScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', backend: string, backendCapabilities: array{setDisplayName: bool, setPassword: bool}, biography: string, biographyScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', bluesky: string, blueskyScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', displayname: string, displaynameScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', email: null|string, emailScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', enabled?: bool, fediverse: string, fediverseScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', firstLoginTimestamp: int, groups: list<string>, headline: string, headlineScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', id: string, language: string, lastLogin: int, lastLoginTimestamp: int, locale: string, manager: string, notify_email: null|string, organisation: string, organisationScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', phone: string, phoneScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', profile_enabled: string, profile_enabledScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', pronouns: string, pronounsScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', quota: array{free?: float|int, quota?: float|int|string, relative?: float|int, total?: float|int, used?: float|int}, role: string, roleScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', storageLocation?: string, subadmin: list<string>, timezone: string, twitter: string, twitterScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-published', website: string, websiteScope?: 'v2-federated'|'v2-local'|'v2-private'|'v2-pu
}

/**
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/src/mixins/UserRowMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {
return {
selectedGroups: this.user.groups.map((id) => ({ id, name: id })),
selectedSubAdminGroups: this.user.subadmin.map((id) => ({ id, name: id })),
userGroups: this.user.groups.map((id) => ({ id, name: id })),
userGroups: this.user.groupsWithDisplayname.map((group) => ({ id: group.id, name: group.displayname })),
userSubAdminGroups: this.user.subadmin.map((id) => ({ id, name: id })),
}
},
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-users-3239.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-users-3239.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

Loading