Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect groups to a workspace #905

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6118b74
chore: Declare workspace as DAV type in the info.xml
zak39 Dec 11, 2024
77bfedc
feat(php): Create a backend group for the added groups
zak39 Dec 11, 2024
bfef035
feat(php): Add the ability to add groups in workspaces
zak39 Dec 11, 2024
8f73fc4
refactor(middleware): Retrieve spaceId from request in IsSpaceAdminMi…
zak39 Dec 11, 2024
f206389
feat(route): Create routes for added groups
zak39 Dec 11, 2024
f005013
l10n: Translate new sentences for added groups
zak39 Dec 11, 2024
a28c272
style: Add a new icon for the added group
zak39 Dec 11, 2024
ed1183e
feat: Render the added groups on the fron-end
zak39 Dec 11, 2024
5cfb86a
test(php): Add the connected groups to existing tests
zak39 Dec 11, 2024
7c9fb77
test(js): Add the connected groups to existing tests
zak39 Dec 11, 2024
e261917
fix(vue): Add functions to increment or decrement the user counter bu…
zak39 Dec 16, 2024
7f4fe35
fix(vue): Add NcModal component to AddUsersTabs component
zak39 Dec 16, 2024
e906327
fix(l10n): Translate wm to "Gestionnaire d'espace" in French
zak39 Dec 16, 2024
604b5c6
fix(vue): Use $route.params.slug instead of $route.params.group
zak39 Dec 16, 2024
584eb51
fix: Add 'added_groups' key when creating a workspace
zak39 Dec 16, 2024
f3c1be8
refactor: Add is_connected and profile keys when formatting a user
zak39 Dec 16, 2024
4347f80
style: run composer cs:fix
zak39 Dec 16, 2024
3c5103b
style(vue,js): Run eslint --ext .js,.vue src --fix
zak39 Dec 16, 2024
3b4a8e0
test(php): Add 'added_groups' key when creating a workspace
zak39 Dec 16, 2024
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
4 changes: 4 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

<summary>Create Groupfolders with delegated management</summary>

<types>
<dav />
</types>

<description><![CDATA[
# Description
Expand Down
35 changes: 35 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
'url' => '/',
'verb' => 'GET',
],
[
'name' => 'connectedGroup#addConnectedGroup',
'url' => '/spaces/{spaceId}/connected-group',
'verb' => 'POST'
],
[
'name' => 'connectedGroup#getConnectedGroupsFromSpaceId',
'url' => '/spaces/{spaceId}/connected-group',
'verb' => 'GET'
],
[
'name' => 'connectedGroup#getConnectedGroups',
'url' => '/connected-group',
'verb' => 'GET'
],
[
'name' => 'workspace#addGroupsInfo',
'url' => '/api/workspace/formatGroups',
Expand Down Expand Up @@ -77,6 +92,16 @@
'url' => '/workspaces',
'verb' => 'GET'
],
[
'name' => 'connectedGroup#addGroup',
'url' => '/spaces/{spaceId}/connected-groups/{gid}',
'verb' => 'POST',
],
[
'name' => 'connectedGroup#removeGroup',
'url' => '/spaces/{spaceId}/connected-groups/{gid}',
'verb' => 'DELETE'
],
[
'name' => 'workspace#findAll',
'url' => '/spaces',
Expand Down Expand Up @@ -117,6 +142,11 @@
'url' => '/api/group/{gid}',
'verb' => 'PATCH',
],
[
'name' => 'group#search',
'url' => '/groups',
'verb' => 'GET',
],
[
'name' => 'group#addUser',
/**
Expand Down Expand Up @@ -147,6 +177,11 @@
'url' => '/api/group/delUser/{spaceId}',
'verb' => 'PATCH',
],
[
'name' => 'workspace#getUsers',
'url' => '/spaces/{spaceId}/users',
'verb' => 'GET',
],
[
'name' => 'group#removeUserFromWorkspace',
'url' => '/spaces/{spaceId}/users/{user}/groups',
Expand Down
6 changes: 6 additions & 0 deletions css/workspace-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@
.workspace-sidebar .icon-collapse {
visibility: visible !important;
}

.icon-added-group, .icon-added-group-dark {
background-image: url('../img/added_group_black.svg');
min-width: 42px;
min-height: 42px;
}
9 changes: 9 additions & 0 deletions img/added_group_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions l10n/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ OC.L10N.register(
'Are you sure you want to delete the {space} workspace ?': 'Opravdu chcete prostor {space} smazat?',
'Add users': 'Přidat uživatele',
'All spaces': 'Všechny prac. prostory',
'admin': 'Správce prac. prostour',
'wm': 'Správce prac. prostour',
'Error': 'Chyba',
'Please specify a name.': 'Zadejte název.',
'Caution, users highlighted in red are not yet member of this workspace. They will be automaticaly added.': 'Upozornění – červeně označení uživatelé ještě nejsou členy tohoto pracovního prostoru. Budou automaticky přidáni.',
'Create group': 'Vytvořit skupinu',
'Create a workspace group': 'Vytvořit skupinu',
'Delete space': 'Smazat prac. prostor',
'Delete user': 'Odebrat uživatele',
'Error 403': 'Chyba 403',
Expand Down
2 changes: 1 addition & 1 deletion l10n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Error": "Chyba",
"Please specify a name.": "Zadejte název.",
"Caution, users highlighted in red are not yet member of this workspace. They will be automaticaly added.": "Upozornění – červeně označení uživatelé ještě nejsou členy tohoto pracovního prostoru. Budou automaticky přidáni.",
"Create group": "Vytvořit skupinu",
"Create a workspace group": "Vytvořit skupinu",
"Delete space": "Smazat prac. prostor",
"Delete user": "Odebrat uživatele",
"Error 403": "Chyba 403",
Expand Down
25 changes: 21 additions & 4 deletions l10n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ OC.L10N.register(
{
'Workspace': 'Workspace',
'Are you sure you want to delete the {space} workspace ?': 'Are you sure you want to delete the {space} workspace ?',
'Add': 'Add',
'Add users': 'Add users',
'Add a group': 'Add a group',
'All spaces': 'All Workspaces',
'Administrators': 'General manager',
'admin': 'Workspace manager',
'wm': 'Workspace manager',
'Error': 'Error',
'Settings': 'Settings',
'Please specify a name.': 'Please specify a name.',
Expand All @@ -15,7 +17,8 @@ OC.L10N.register(
'Unknown error': 'Unknown error',
'Error in file format': 'Error in file format',
'Caution, users highlighted in red are not yet member of this workspace. They will be automaticaly added.': 'Caution, users highlighted in red are not yet member of this workspace. They will be automaticaly added.',
'Create group': 'Create group',
'Create a workspace group': 'Create a workspace group',
'Add a group': 'Add a group',
'Delete space': 'Delete Workspace',
'Search users': 'Search users',
'Delete user': 'Remove user',
Expand All @@ -24,6 +27,7 @@ OC.L10N.register(
'Error in the table header': 'Error in the table header',
'The content of your file is invalid. Two columns are required, with the following header names and values:<br>- "user": the user\'s username or e-mail address<br>- "role": the user\'s role ("u" or "user" for a user and "wm" for a workspace manager)': 'The content of your file is invalid. Two columns are required, with the following header names and values:<br>- "user": the user\'s username or e-mail address<br>- "role": the user\'s role ("u" or "user" for a user and "wm" for a workspace manager)',
'This group already exists. Please, change the name': 'This group already exists. Please, change the name',
'Remove conntected group': 'Remove conntected group',
'You aren\'t allowed to access into this application !': 'You aren\'t allowed to access into this application !',
'Only the following values are allowed: <b>%1$s</b><br><br>- "wm": to define the user as a workspace manager.<br>- "u" or "user": to define the user as a simple user.<br><br>Check the role for these users:<br>%2$s': 'Only the following values are allowed: <b>%1$s</b><br><br>- "wm": to define the user as a workspace manager.<br>- "u" or "user": to define the user as a simple user.<br><br>Check the role for these users:<br>%2$s',
'Error in CSV file content': 'Error in CSV file content',
Expand All @@ -32,10 +36,12 @@ OC.L10N.register(
'Your CSV file must use a comma (",") as separator': 'Your CSV file must use a comma (",") as separator',
'Email': 'Emails',
'Groups': 'Groups',
'remove group from selection': 'remove group from selection',
'No group selected': 'No group selected',
'Duplication of groups': 'Duplication of groups',
'or': 'or',
'The group already exists.': 'The group already exists.',
'Make administrator': 'Assign as Workspace manager',
'Make administrator': 'Assign as WM',
'Error to rename space': 'Error to rename space',
'The space name already exist. We cannot rename with this name.': 'The space name already exist. We cannot rename with this name.',
'User doesn\'t exist': 'User doesn\'t exist',
Expand All @@ -53,7 +59,7 @@ OC.L10N.register(
'Select groupfolders to convert in workspace': 'Select groupfolders to convert in workspace',
'Convert in spaces': 'Convert in spaces',
'The name space must be defined.': 'The name space must be defined.',
'Remove admin rights': 'Remove workspace manager rights',
'Remove admin rights': 'Remove WM rights',
'Remove user from selection': 'Remove user from selection',
'There is a problem to add group to groupfolder. The group is deleted.': 'There is a problem to add group to groupfolder. The group is deleted.',
'Rename space': 'Rename Workspace',
Expand All @@ -71,6 +77,7 @@ OC.L10N.register(
'Remove from group': 'Remove from group',
'Workspace name': 'Workspace name',
'No users': 'No users',
'Start typing text to search for groups': 'Start typing text to search for groups',
'Group name': 'Group name',
'Space name': 'Space name',
'Your Workspace name must not contain the following characters: [ ~ < > { } | ; . : , ! ? \' @ # $ + ( ) % \\\\ ^ = / & * ]': 'Your Workspace name must not contain the following characters: [ ~ < > { } | ; . : , ! ? \' @ # $ + ( ) % \\ ^ = / & * ]',
Expand All @@ -85,6 +92,11 @@ OC.L10N.register(
'unlimited': 'unlimited',
'You may only specify "unlimited" or a number followed by "TB", "GB", "MB", or "KB" (eg: "5GB") as quota': 'Vous devez spécifier le terme "unlimited" ou un nombre suivi de "TB", "GB", "MB" ou "KB" (exemple: "5GB") comme quota.',
'This space or groupfolder already exist. Please, input another space.\nIf "toto" space exist, you cannot create the "tOTo" space.\nMake sure you the groupfolder doesn\'t exist.': 'This space or groupfolder already exist. Please, input another space.\nIf "toto" space exist, you cannot create the "tOTo" space.\nMake sure you the groupfolder doesn\'t exist.',
'Please, note that once {groupname} group has been removed, its users will lose access to the {spacename} workspace': 'Please, note that once {groupname} group has been removed, its users will lose access to the {spacename} workspace',
'Please note that after deleting the {groupname} group, its users will retain access to the {spacename} workspace': 'Please note that after deleting the {groupname} group, its users will retain access to the {spacename} workspace',
'Confirm': 'Confirm',
'Workspace groups': 'Workspace groups',
'Added groups': 'Added groups',
'A network error occured while trying to create group {group}<br>The error is: {error}': 'A network error occured while trying to create group {group}<br>The error is: {error}',
'A network error occured while trying to add user {user_name} to workspaces.<br>The error is: {error}': 'A network error occured while trying to add user {user_name} to workspaces.<br>The error is: {error}',
'An error occured while trying to retrieve workspaces.<br>The error is: {error}': 'An error occured while trying to retrieve workspaces.<br>The error is: {error}',
Expand All @@ -104,5 +116,10 @@ OC.L10N.register(
'Something went wrong. Couldn\'t open the file.': 'Something went wrong. Couldn\'t open the file.',
'Upload new files': 'Upload new files',
'Choose from Files': 'Choose from Files',
'Warning, after removal of group <b>{groupname}</b>, its users will lose access to the <b>nouveaux espaces</b> workspace, with the exception of:<br><br>- Workspace Managers (<b>WM-nouveaux espaces</b>)<br>- users who are members of <b>Groupe Workspace</b> (prefixed <b>G-</b>)<br>- users who are members of another Added Group<br>- users manually added from the Workspace <b>nouveaux espaces</b>': 'Warning, after removal of group <b>{groupname}</b>, its users will lose access to the <b>nouveaux espaces</b> workspace, with the exception of:<br><br>- Workspace Managers (<b>WM-nouveaux espaces</b>)<br>- users who are members of <b>Groupe Workspace</b> (prefixed <b>G-</b>)<br>- users who are members of another Added Group<br>- users manually added from the Workspace <b>nouveaux espaces</b>',
'Wrong file extension. Must be <b>.csv</b>.': 'Wrong file extension. Must be <b>.csv</b>.',
'Add users from csv file': 'Ajouter à partir du fichier csv',
'Import csv from Files': 'Importer csv à partir de Files',
'View Profile': 'View Profile'
},
'nplurals=2; plural=(n > 1)')
Loading
Loading