Skip to content

Commit fcd5da1

Browse files
committed
chore: Backport fixes
Signed-off-by: Louis Chemineau <[email protected]>
1 parent 9cac821 commit fcd5da1

12 files changed

+344
-15
lines changed

apps/provisioning_api/openapi-full.json

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,6 +3593,168 @@
35933593
}
35943594
}
35953595
},
3596+
"/ocs/v2.php/cloud/users/{userId}/groups/details": {
3597+
"get": {
3598+
"operationId": "users-get-users-groups-details",
3599+
"summary": "Get a list of groups with details",
3600+
"tags": [
3601+
"users"
3602+
],
3603+
"security": [
3604+
{
3605+
"bearer_auth": []
3606+
},
3607+
{
3608+
"basic_auth": []
3609+
}
3610+
],
3611+
"parameters": [
3612+
{
3613+
"name": "userId",
3614+
"in": "path",
3615+
"description": "ID of the user",
3616+
"required": true,
3617+
"schema": {
3618+
"type": "string"
3619+
}
3620+
},
3621+
{
3622+
"name": "OCS-APIRequest",
3623+
"in": "header",
3624+
"description": "Required to be true for the API request to pass",
3625+
"required": true,
3626+
"schema": {
3627+
"type": "boolean",
3628+
"default": true
3629+
}
3630+
}
3631+
],
3632+
"responses": {
3633+
"200": {
3634+
"description": "Users groups returned",
3635+
"content": {
3636+
"application/json": {
3637+
"schema": {
3638+
"type": "object",
3639+
"required": [
3640+
"ocs"
3641+
],
3642+
"properties": {
3643+
"ocs": {
3644+
"type": "object",
3645+
"required": [
3646+
"meta",
3647+
"data"
3648+
],
3649+
"properties": {
3650+
"meta": {
3651+
"$ref": "#/components/schemas/OCSMeta"
3652+
},
3653+
"data": {
3654+
"type": "object",
3655+
"required": [
3656+
"groups"
3657+
],
3658+
"properties": {
3659+
"groups": {
3660+
"type": "array",
3661+
"items": {
3662+
"$ref": "#/components/schemas/GroupDetails"
3663+
}
3664+
}
3665+
}
3666+
}
3667+
}
3668+
}
3669+
}
3670+
}
3671+
}
3672+
}
3673+
}
3674+
}
3675+
}
3676+
},
3677+
"/ocs/v2.php/cloud/users/{userId}/subadmins/details": {
3678+
"get": {
3679+
"operationId": "users-get-user-sub-admin-groups-details",
3680+
"summary": "Get a list of the groups the user is a subadmin of, with details",
3681+
"tags": [
3682+
"users"
3683+
],
3684+
"security": [
3685+
{
3686+
"bearer_auth": []
3687+
},
3688+
{
3689+
"basic_auth": []
3690+
}
3691+
],
3692+
"parameters": [
3693+
{
3694+
"name": "userId",
3695+
"in": "path",
3696+
"description": "ID of the user",
3697+
"required": true,
3698+
"schema": {
3699+
"type": "string"
3700+
}
3701+
},
3702+
{
3703+
"name": "OCS-APIRequest",
3704+
"in": "header",
3705+
"description": "Required to be true for the API request to pass",
3706+
"required": true,
3707+
"schema": {
3708+
"type": "boolean",
3709+
"default": true
3710+
}
3711+
}
3712+
],
3713+
"responses": {
3714+
"200": {
3715+
"description": "Users subadmin groups returned",
3716+
"content": {
3717+
"application/json": {
3718+
"schema": {
3719+
"type": "object",
3720+
"required": [
3721+
"ocs"
3722+
],
3723+
"properties": {
3724+
"ocs": {
3725+
"type": "object",
3726+
"required": [
3727+
"meta",
3728+
"data"
3729+
],
3730+
"properties": {
3731+
"meta": {
3732+
"$ref": "#/components/schemas/OCSMeta"
3733+
},
3734+
"data": {
3735+
"type": "object",
3736+
"required": [
3737+
"groups"
3738+
],
3739+
"properties": {
3740+
"groups": {
3741+
"type": "array",
3742+
"items": {
3743+
"$ref": "#/components/schemas/GroupDetails"
3744+
}
3745+
}
3746+
}
3747+
}
3748+
}
3749+
}
3750+
}
3751+
}
3752+
}
3753+
}
3754+
}
3755+
}
3756+
}
3757+
},
35963758
"/ocs/v2.php/cloud/users/{userId}/welcome": {
35973759
"post": {
35983760
"operationId": "users-resend-welcome-message",

apps/provisioning_api/openapi.json

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,6 +2530,168 @@
25302530
}
25312531
}
25322532
},
2533+
"/ocs/v2.php/cloud/users/{userId}/groups/details": {
2534+
"get": {
2535+
"operationId": "users-get-users-groups-details",
2536+
"summary": "Get a list of groups with details",
2537+
"tags": [
2538+
"users"
2539+
],
2540+
"security": [
2541+
{
2542+
"bearer_auth": []
2543+
},
2544+
{
2545+
"basic_auth": []
2546+
}
2547+
],
2548+
"parameters": [
2549+
{
2550+
"name": "userId",
2551+
"in": "path",
2552+
"description": "ID of the user",
2553+
"required": true,
2554+
"schema": {
2555+
"type": "string"
2556+
}
2557+
},
2558+
{
2559+
"name": "OCS-APIRequest",
2560+
"in": "header",
2561+
"description": "Required to be true for the API request to pass",
2562+
"required": true,
2563+
"schema": {
2564+
"type": "boolean",
2565+
"default": true
2566+
}
2567+
}
2568+
],
2569+
"responses": {
2570+
"200": {
2571+
"description": "Users groups returned",
2572+
"content": {
2573+
"application/json": {
2574+
"schema": {
2575+
"type": "object",
2576+
"required": [
2577+
"ocs"
2578+
],
2579+
"properties": {
2580+
"ocs": {
2581+
"type": "object",
2582+
"required": [
2583+
"meta",
2584+
"data"
2585+
],
2586+
"properties": {
2587+
"meta": {
2588+
"$ref": "#/components/schemas/OCSMeta"
2589+
},
2590+
"data": {
2591+
"type": "object",
2592+
"required": [
2593+
"groups"
2594+
],
2595+
"properties": {
2596+
"groups": {
2597+
"type": "array",
2598+
"items": {
2599+
"$ref": "#/components/schemas/GroupDetails"
2600+
}
2601+
}
2602+
}
2603+
}
2604+
}
2605+
}
2606+
}
2607+
}
2608+
}
2609+
}
2610+
}
2611+
}
2612+
}
2613+
},
2614+
"/ocs/v2.php/cloud/users/{userId}/subadmins/details": {
2615+
"get": {
2616+
"operationId": "users-get-user-sub-admin-groups-details",
2617+
"summary": "Get a list of the groups the user is a subadmin of, with details",
2618+
"tags": [
2619+
"users"
2620+
],
2621+
"security": [
2622+
{
2623+
"bearer_auth": []
2624+
},
2625+
{
2626+
"basic_auth": []
2627+
}
2628+
],
2629+
"parameters": [
2630+
{
2631+
"name": "userId",
2632+
"in": "path",
2633+
"description": "ID of the user",
2634+
"required": true,
2635+
"schema": {
2636+
"type": "string"
2637+
}
2638+
},
2639+
{
2640+
"name": "OCS-APIRequest",
2641+
"in": "header",
2642+
"description": "Required to be true for the API request to pass",
2643+
"required": true,
2644+
"schema": {
2645+
"type": "boolean",
2646+
"default": true
2647+
}
2648+
}
2649+
],
2650+
"responses": {
2651+
"200": {
2652+
"description": "Users subadmin groups returned",
2653+
"content": {
2654+
"application/json": {
2655+
"schema": {
2656+
"type": "object",
2657+
"required": [
2658+
"ocs"
2659+
],
2660+
"properties": {
2661+
"ocs": {
2662+
"type": "object",
2663+
"required": [
2664+
"meta",
2665+
"data"
2666+
],
2667+
"properties": {
2668+
"meta": {
2669+
"$ref": "#/components/schemas/OCSMeta"
2670+
},
2671+
"data": {
2672+
"type": "object",
2673+
"required": [
2674+
"groups"
2675+
],
2676+
"properties": {
2677+
"groups": {
2678+
"type": "array",
2679+
"items": {
2680+
"$ref": "#/components/schemas/GroupDetails"
2681+
}
2682+
}
2683+
}
2684+
}
2685+
}
2686+
}
2687+
}
2688+
}
2689+
}
2690+
}
2691+
}
2692+
}
2693+
}
2694+
},
25332695
"/ocs/v2.php/cloud/users/{userId}/welcome": {
25342696
"post": {
25352697
"operationId": "users-resend-welcome-message",

apps/settings/lib/Controller/UsersController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function usersList(): TemplateResponse {
134134
$adminGroupData = [
135135
'id' => $adminGroup->getGID(),
136136
'name' => $adminGroup->getDisplayName(),
137-
'usercount' => $sortGroupsBy === MetaData::SORT_USERCOUNT ? $adminGroup->count() : 0,
137+
'usercount' => $sortGroupsBy === \OC\Group\MetaData::SORT_USERCOUNT ? $adminGroup->count() : 0,
138138
'disabled' => $adminGroup->countDisabled(),
139139
'canAdd' => $adminGroup->canAddUser(),
140140
'canRemove' => $adminGroup->canRemoveUser(),

apps/settings/src/components/Users/NewUserDialog.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
:required="!settings.isAdmin && !settings.isDelegatedAdmin"
7474
:create-option="(value) => ({ id: value, name: value, isCreating: true })"
7575
@search="searchGroups"
76-
@option:created="createGroup" />
76+
@option:created="createGroup"
77+
@option:selected="options => addGroup(options.at(-1))" />
7778
<!-- If user is not admin, he is a subadmin.
7879
Subadmins can't create users outside their groups
7980
Therefore, empty select is forbidden -->

apps/settings/src/mixins/UserRowMixin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ export default {
2626
default: () => [],
2727
},
2828
},
29+
data() {
30+
return {
31+
availableGroups: this.user.groups.map(id => ({ id, name: id })),
32+
availableSubAdminGroups: this.user.subadmin.map(id => ({ id, name: id })),
33+
userGroups: this.user.groups.map(id => ({ id, name: id })),
34+
userSubAdminGroups: this.user.subadmin.map(id => ({ id, name: id })),
35+
}
36+
},
2937
computed: {
3038
showConfig() {
3139
return this.$store.getters.getShowConfig

apps/settings/src/views/UserManagementNavigation.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,13 @@ import { mdiAccount, mdiAccountOff, mdiCog, mdiPlus, mdiShieldAccount, mdiHistor
101101
import { translate as t } from '@nextcloud/l10n'
102102
import { computed, ref } from 'vue'
103103
104-
import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput.js'
105-
import NcActionText from '@nextcloud/vue/dist/Components/NcActionText.js'
106104
import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js'
107-
import NcAppNavigationCaption from '@nextcloud/vue/dist/Components/NcAppNavigationCaption.js'
108105
import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'
109106
import NcAppNavigationList from '@nextcloud/vue/dist/Components/NcAppNavigationList.js'
110107
import NcAppNavigationNew from '@nextcloud/vue/dist/Components/NcAppNavigationNew.js'
111108
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
112109
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js'
113110
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
114-
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
115111
116112
import UserSettingsDialog from '../components/Users/UserSettingsDialog.vue'
117113
import AppNavigationGroupList from '../components/AppNavigationGroupList.vue'

dist/settings-apps-view-4529.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-apps-view-4529.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-users-3239.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-users-3239.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)