Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ff76f4a
perf(settings): Remove computation of all groups
Pytal Mar 25, 2025
8f10477
fix(settings): Fix infinitely loading account management page with pa…
Pytal Mar 25, 2025
5167b56
feat(provisioning_api): Add endpoint for fetching user groups with de…
Pytal Mar 25, 2025
f664eb8
perf(settings): Cancel request on new search
Pytal Mar 25, 2025
86e521d
fix(settings): Allow searching for groups in user row
Pytal Mar 25, 2025
328bb10
fix(settings): Allow searching for groups in new account dialog
Pytal Mar 25, 2025
c3dba3b
perf(settings): Make scrolling smooth when a large number of groups a…
Pytal Mar 25, 2025
1fbf26a
refactor(settings): Consolidate group formatting
Pytal Mar 25, 2025
537d68d
chore(settings): Add note on groups sorting
Pytal Mar 25, 2025
82cd9a2
fix(settings): Fix loaded groups being undefined
Pytal Mar 25, 2025
74b26f7
fix(settings): Prevent selection of invalid groups that are not fully…
Pytal Mar 25, 2025
ae390d2
fix(settings): Fix erroneous hiding of group admin column with pagina…
Pytal Mar 25, 2025
2cc7ebe
feat(provisioning_api): Add endpoint for fetching user subadmin group…
Pytal Mar 25, 2025
d3b8171
fix(settings): Fix editing groups and subadmin groups of user
Pytal Mar 25, 2025
21dbef7
fix(settings): Only change usercount if group can be found
Pytal Mar 25, 2025
91af8d1
fix(settings): Fix group creation when editing users
Pytal Mar 25, 2025
c022d2f
fix(settings): Fix group creation in new account dialog
Pytal Mar 25, 2025
42b7fda
fix(settings): Fix duplicated group options when editing account
Pytal Mar 25, 2025
a5e2c7d
fix(settings): Fix duplicated group options in new account dialog
Pytal Mar 25, 2025
75708f5
fix(settings): Natural order groups
Pytal Mar 25, 2025
368fcc3
fix(settings): Preserve system groups on reset
Pytal Mar 25, 2025
f1ed995
fix(settings): Fix initialization of store
Pytal Mar 25, 2025
3402b7c
fix(settings): Separate subadmin options
Pytal Mar 25, 2025
06af6de
test(settings): Wait until groups list has loaded
Pytal Mar 25, 2025
85dc4b4
test(settings): Correctly find group in select
Pytal Mar 25, 2025
58fc803
test(settings): Fix group items not being found
Pytal Mar 25, 2025
9cac821
chore(assets): Recompile assets
nextcloud-command Mar 28, 2025
fcd5da1
chore: Backport fixes
artonge Apr 1, 2025
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
Prev Previous commit
chore: Backport fixes
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Apr 1, 2025
commit fcd5da101f8a0b24332f2e4d548b9aab8f3595f6
162 changes: 162 additions & 0 deletions apps/provisioning_api/openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -3593,6 +3593,168 @@
}
}
},
"/ocs/v2.php/cloud/users/{userId}/groups/details": {
"get": {
"operationId": "users-get-users-groups-details",
"summary": "Get a list of groups with details",
"tags": [
"users"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "userId",
"in": "path",
"description": "ID of the user",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Users groups returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupDetails"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/cloud/users/{userId}/subadmins/details": {
"get": {
"operationId": "users-get-user-sub-admin-groups-details",
"summary": "Get a list of the groups the user is a subadmin of, with details",
"tags": [
"users"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "userId",
"in": "path",
"description": "ID of the user",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Users subadmin groups returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupDetails"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/cloud/users/{userId}/welcome": {
"post": {
"operationId": "users-resend-welcome-message",
Expand Down
162 changes: 162 additions & 0 deletions apps/provisioning_api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,168 @@
}
}
},
"/ocs/v2.php/cloud/users/{userId}/groups/details": {
"get": {
"operationId": "users-get-users-groups-details",
"summary": "Get a list of groups with details",
"tags": [
"users"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "userId",
"in": "path",
"description": "ID of the user",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Users groups returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupDetails"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/cloud/users/{userId}/subadmins/details": {
"get": {
"operationId": "users-get-user-sub-admin-groups-details",
"summary": "Get a list of the groups the user is a subadmin of, with details",
"tags": [
"users"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "userId",
"in": "path",
"description": "ID of the user",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Users subadmin groups returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupDetails"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/cloud/users/{userId}/welcome": {
"post": {
"operationId": "users-resend-welcome-message",
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function usersList(): TemplateResponse {
$adminGroupData = [
'id' => $adminGroup->getGID(),
'name' => $adminGroup->getDisplayName(),
'usercount' => $sortGroupsBy === MetaData::SORT_USERCOUNT ? $adminGroup->count() : 0,
'usercount' => $sortGroupsBy === \OC\Group\MetaData::SORT_USERCOUNT ? $adminGroup->count() : 0,
'disabled' => $adminGroup->countDisabled(),
'canAdd' => $adminGroup->canAddUser(),
'canRemove' => $adminGroup->canRemoveUser(),
Expand Down
3 changes: 2 additions & 1 deletion apps/settings/src/components/Users/NewUserDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
:required="!settings.isAdmin && !settings.isDelegatedAdmin"
:create-option="(value) => ({ id: value, name: value, isCreating: true })"
@search="searchGroups"
@option:created="createGroup" />
@option:created="createGroup"
@option:selected="options => addGroup(options.at(-1))" />
<!-- If user is not admin, he is a subadmin.
Subadmins can't create users outside their groups
Therefore, empty select is forbidden -->
Expand Down
8 changes: 8 additions & 0 deletions apps/settings/src/mixins/UserRowMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ export default {
default: () => [],
},
},
data() {
return {
availableGroups: this.user.groups.map(id => ({ id, name: id })),
availableSubAdminGroups: this.user.subadmin.map(id => ({ id, name: id })),
userGroups: this.user.groups.map(id => ({ id, name: id })),
userSubAdminGroups: this.user.subadmin.map(id => ({ id, name: id })),
}
},
computed: {
showConfig() {
return this.$store.getters.getShowConfig
Expand Down
4 changes: 0 additions & 4 deletions apps/settings/src/views/UserManagementNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,13 @@ import { mdiAccount, mdiAccountOff, mdiCog, mdiPlus, mdiShieldAccount, mdiHistor
import { translate as t } from '@nextcloud/l10n'
import { computed, ref } from 'vue'

import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput.js'
import NcActionText from '@nextcloud/vue/dist/Components/NcActionText.js'
import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js'
import NcAppNavigationCaption from '@nextcloud/vue/dist/Components/NcAppNavigationCaption.js'
import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'
import NcAppNavigationList from '@nextcloud/vue/dist/Components/NcAppNavigationList.js'
import NcAppNavigationNew from '@nextcloud/vue/dist/Components/NcAppNavigationNew.js'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js'
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'

import UserSettingsDialog from '../components/Users/UserSettingsDialog.vue'
import AppNavigationGroupList from '../components/AppNavigationGroupList.vue'
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-apps-view-4529.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-apps-view-4529.js.map

Large diffs are not rendered by default.

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