Git Product home page Git Product logo

workspace's Introduction

Workspace

Create shared workspaces and delegate management of their members and groups.

Workspace Home

Workspace allows managers to :

  • Create shared workspaces
  • Delegate management of each workspace to users (workspace managers) in order for them to :
    • choose members
    • create groups
    • configure advanced permissions on workspace folders
  • All through a simple unified interface, designed to simplify your users' experience and make them autonomous

This app is a Nextcloud extension of the Groupfolders app.

For more information, please visit our website (french content).

Installation

Requirements

From Nextcloud 25

  • PHP 8.0
  • Nextcloud 25 or after
  • Install Group Folders on the Nextcloud app store

For Nextcloud 24 and before

Limit the Workspace app to specific groups

In your "application management" administrator interface, limit the application to the following groups: GeneralManager and WorkspacesManagers.

🔧 Configure Groupfolders for Workspace

From Nextcloud 25

In Settings > Group folders > Group folder admin delegation section, add the group GeneralManager to the first field, and the group WorkspacesManagers to the second field

For Nextcloud 24 and before

In Settings > Group folders > Group folder admin delegation section, add the groups GeneralManager and WorkspacesManagers.

Define which users will be General Managers

Add the users in charge of creating Workspaces to the GeneralManager group.

Contributing

Workspace is a Free Software that you can contribute freely to. If you would like to contribute by making a bug report or suggest a functionality for example, we invite you to read our contribution policy beforehand.

Development and Build

Requirements

  • npm v10.0.0
  • node v20.0
  • php v8.0
  • composer v2.0.13
  • make v3.82
  • git v1.8

📦 Building the app

First, clone into your apps directory (example: /var/www/html/nextcloud/apps/).

git clone https://github.com/arawa/workspace.git

Then, you can build app :

cd workspace
make

🚨 Caution : You must install npm and composer before use make command line.

If it's okay, we can use or dev the Workspace app !

📦 Create an artifact

make source

An artifact will be created in the build/artifacts/source from the project.

📦 For Nextcloud 21 and 24, build Arawa\Groupfolders

Clone this app into your apps directory (example: /var/www/html/nextcloud/apps/) and switch of the branch to be in allow-admin-delegation-stable21.

git clone https://github.com/arawa/groupfolders.git
cd groupfolders
git checkout allow-admin-delegation-stable21

Then, you can build.

make

🚨 Caution : You must install npm and composer before use make command line.

After this, you can enable the Groupfolders app.

📋 Running tests

Front-end

npm run test

Back-end

composer run test

or

sudo -u nginx /usr/local/bin/composer run test

Security Issues

Please, read the security.txt.

If you want to report us a security issue. Please, read our security-policy.md file.

Upgrade guideline

This section is very important to resolve rare bugs. We try hard to do resolve major bugs and to have a better user experience.

v3.0.4

For this version, you should refresh your browser from the Workspace app with Ctrl, Shift + R.

workspace's People

Contributors

acdmft avatar clementine46 avatar dependabot[bot] avatar fifh avatar livoriona avatar p-bo avatar pielonet avatar skjnldsv avatar smarinier avatar stcyr avatar thibautplg avatar zak39 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

workspace's Issues

Access error should return a page template and not a json

When a user who is not in GeneralManager group, he has a json page and not a web page from Nextcloud.

To test that :

  1. First, you connect to our dev platform ;
  2. Second, in the users settings, remove me to GeneralManager group ;
  3. Third, use impersonate to impersonate me ;
  4. Then, click on the Workspace button and look at the result ;

I think the Middleware should return a page template.

Doc : https://docs.nextcloud.com/server/21/developer_manual/basics/middlewares.html.

Originally posted by @zak39 in #22 (comment)

routing issues

if the user reloads the main page ("All spaces" page), he gets redirected to NC's dashboard

Steps to reproduce

  1. open workspace (url is something like https://acme.org/index.php/apps/workspace
  2. click on a space to view its details page
  3. click on the "All Spaces" button to go back to the application's main page
  4. note how the url gets a '/' appended compared to url at step 1 (url is something like https://acme.org/index.php/apps/workspace/
  5. refresh the page

Creating group in frontend should use a single route

// Creates group in backend

The frontend currently uses 2 routes to do that:

			// Creates group in backend
			axios.post(generateUrl(`/apps/workspace/group/add/${group}`))
				.then((resp) => {
					// Give group access to space
					axios.post(generateUrl(`/apps/groupfolders/folders/${this.$route.params.space}/groups`), { group })
						.then((resp) => {
							// Navigates to the group's details page
							this.$store.state.spaces[this.$route.params.space].isOpen = true
							this.$router.push({
								path: `/group/${this.$route.params.space}/${group}`,
							})
						})
						.catch((e) => {
							// TODO revert frontend change, delete group in backend, inform user
						})
				})
				.catch((e) => {
					this.$store.commit('removeGroupFromSpace', { name: this.$route.params.space, group })
					// TODO Inform user
				})

Add a logo

Change the logo to the EP application, visible in the Nextcloud application menu, based on feedback from Clementine.

Cannot change LDAP user's role

on nc20 today:

{"reqId":"hICpjpuAMYjm3znNHi71","level":0,"time":"2021-06-04T17:33:31+02:00","remoteAddr":"178.51.145.29","user":"admin","app":"user_ldap","method":"PATCH","url":"/apps/workspace/api/space/MonGroupFolder/user/Nicolas%20V%C3%A9rit%C3%A9","message":"No DN found for Nicolas V\u00e9rit\u00e9 on ldaps://test.arawa.fr","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":"20.0.9.1"}

Nextcloud Workspace Design proposal

Workspace is based on the current Group Folders app on Nextcloud that manages workspace for joint work

Those workspaces are created by general managers. Simple users only have access to the files.
General managers can assign Workspace managers to handle the workspaces.

In these mockups, the user is a general manager.

Workspace Homepage

01 Home

The Workspace app's ergonomic design is pretty similar to the Deck app (when using the "All boards" option).
There is a collapsible side menu on the left that lists all the workspaces and their number of users.
The "all workspaces" option shows the same list on the main page with more information : the quota and the managers.

Creating a new Workspace

01 création espace

The creation button at the top of the side menu allows to quickly create a new workspace with a default unlimited quota.

Workspace

05 Espace A

Once the manager clicks on a workspace, they get access to the list of members with their names and emails. The roles of each member is specified in the middle column, workspace managers are fixed to the top of the list. The right column indicates the workspace's groups that each member is a part of.

Workspace Settings

02 paramètres

Workspace settings allow the manager to rename and delete the workspace, member settings allow to remove a member from the workspace or assign them as workspace manager.

Add members to a workspace

03 ajout membres

The + button on the top right corner allows the manager to add members or create a new group.
The "add members" option opens a modal with a search bar for users. Once the users are selected, they can be assigned as workspace managers by checking the checkbox.

Create a group

04 création groupe

Since a workspace can get crowded, there is a possibility of creating groups within it. The creating process is the same as creating a workspace.

Groups appear on the side menu on the left, below the workspace they're a part of.

Add members to a group

05 ajout membres groupes

Adding members to a group is exactly the same as adding members to a workspace, apart from the fact that group members cannot be assigned as workspace managers.

We added blue stickers to differentiate workspace's members from generic nextcloud users.
If the manager selects someone who isn't already a member of the workspace, a message will appear, warning that the user will automatically be added to the corresponding workspace.

Group Settings

06 paramètres groupes

The group settings are very similar to the workspace's, the only difference is that the manager cannot assign a group member as a workspace manager (they need to be assigned directly in the workspace).

@jancborchardt @juliushaertl What do you think ?

View and modify the quota of a workspace

Be able to view the quota for each workspace in the interface for managing a workspace

Be able to modify the quota of a workspace in the interface for managing a workspace

image

Add users to subgroups

  • add the functionnality add users to subgroups
  • add a member sticker on members' avatar when the user doesn't belong to the Workspace
  • add red hightlight when the user doesn't belong to the Workspace
  • add advertise message
    See mockups : 21 à 24

Fix workspaces color

Always have the same colour of the workspace label, even after reloading the page, on all pages displaying the workspace:

  • workspace management interface (a),

  • list of workspaces in the left-hand menu (b),

  • list of workspaces in the main workspace page (c)

  • Give the possibility to choose the workspace color at the creation of the workspace.
    24 mai2021 19h10_1
    24 mai2021 19h10

Put admins at the top of the list

Rank the members of a workspace, so that space managers appear first, sorted alphabetically by Nextcloud name. Then single users appear, also sorted alphabetically by Nextcloud name
image

Should we structure our APIs ?

After propositions by @StCyr in this PR : #72 .

He would like to add /api/<resource> in the route.
But, for developers it can be misleading. Because, in a HTTP response we can have ;

  • Informations on HTTP status ;
  • Which verb using ;
  • Different error messages ;
  • A json different according to HTTP Response ;
  • And so on.

For examples :

  1. This here a Jira Cloud Platform's creating issue API : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post-responses . We can see there is a status code to do if the resource is created or not. But also, there is the different message according to HTP response.

  2. In an API, we have to send a message to developer / user to guide him. This here an example a response GitHub's API to create a project :

{
"message": "Requires authentication",
"documentation_url": "https://developer.github.com/v3/repos/#edit"
}

Here, the message indicates to developer / user has to input his credentials.

  1. An API has to use the status code HTTP which is standard (200 / 201 : creating, 200 : patching, 409 : One request is in conflict with the current state of server ;

  2. And so on.

I don't have skills to know everything. But I know it's very important to structure APIs if we use them.

For example of my response after creating a project space :

{
  "space": "Galadriel",
  "id_space": 213,
  "groups": {
    "GE-Galadriel": 31,
    "U-Galadriel": 31
  },
  "space_advanced_permissions": true,
  "space_assign_groups": [
    "GE-Galadriel",
    "U-Galadriel"
  ],
  "acl": {
    "state": true,
    "group_manage": "GE-Galadriel"
  },
  "statuscode": 201
}

Here I write the statuscode to root of json.
Maybe it's very interesting to write as it :

{
  "space": "Galadriel",
  "id_space": 213,
  "groups": {
    "GE-Galadriel": 31,
    "U-Galadriel": 31
  },
  "space_advanced_permissions": true,
  "space_assign_groups": [
    "GE-Galadriel",
    "U-Galadriel"
  ],
  "acl": {
    "state": true,
    "group_manage": "GE-Galadriel"
  },
  "http": {
      "statuscode": 201,
      "message" : "The space is created"
    }
}

What do you think ?

How to build our structure API ?

Sort spaces alphabetically

Related to PR #36, #70 and #71 I guess. Sort Workspace names alphabetically and not case sensitive (upper and lower case should be sorted together) for :

  • (a) the left side menu
  • (b) the interface listing All Workspaces
    10 juin2021 07h57

Error message handling for users

Display at least one error message to users (Workspace Managers & General Managers) when an error occurs (same error message for all errors is acceptable).

Return status code 200 when we aren't admin of a space

When I would like to rename a space where I am not admin of this space.

I have nice the error message : You are not authorized to rename the FauxCrash space..

image

But it returns the status code 200 instead of a status code 401.

image

Bug with the groupfolders' API

I use Groupfolders' API (https://github.com/nextcloud/groupfolders#api), precisely :

POST apps/groupfolders/folders/$folderId/manageACL :Grants/Removes a group or user the ability to manage a groupfolders' advanced permissions.

I use this API to enable advanced permissions and add the group which manage the groupfolder (which is the space manager).

I tried this curl :

curl -H "OCS-APIRequest: true" -X POST "https://username:pwd@instance_nextcloud/apps/groupfolders/folders/161/manageACL" -d "id=MyGoup&type=group&manageACL=true" -H "Accept:Application/json" | jq .

The answer is succeded :

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK",
      "totalitems": "",
      "itemsperpage": ""
    },
    "data": {
      "success": true
    }
  }
}

But it doesn't work :

> select * from oc_group_folders_manage where folder_id=161;
Empty set (9.125 sec)

Fix creating a space

When I create a space, vue.js doesn't redirect into this space (ref: spaceDetail).

Create a backend to get all spaces

Should return an array of objects in json format:

(addendum: we should probably replace the users array by 2 objects: adminGroup, and userGroup)

 {
     'spaceA' :   {
          users: [
                   {
                         name: 'cyrille',
                         role: 'admin',
                         email: '[email protected]',
                     },
                     {
                         name: 'dorianne',
                         role: 'user',
                         email: '[email protected]',
                      },
             ],
             quota: undefined,
      },
      'spaceB' : {
              users: [
                       {
                            name: 'cyrille',
                            role: 'admin',
                            email: '[email protected]',
                        },
                        {
                             name: 'baptiste',
                             role: 'admin',
                             email: '[email protected]',
                          },
                          {
                              name: 'dorianne',
                              role: 'user',
                              email: '[email protected]',
                           },
                    ],
                    quota: '10GB',
           },
},

A TypeError prevent code doing work

Problem : A TypeError prevent code doing work when I create a project space.

Assign: @zak39 & @StCyr

The code where there is error : https://github.com/arawa/workspace/blob/348db3b97bb24519d2dc98db356ce6c3705a1b1e/src/Home.vue

Scenarios

  1. I write France as value to create space project

image

  1. Then I validate by Enter touch or click on the arrow.

  2. The error is triggered

image

I don't know yet where is the problem. I tried to debug with debugs in methods from Home.vue component with console.debug.
But, It didn't work. I didn't see logs in the console 😕

Create a group with all GE

Create a group gathering all space managers of all workspaces.
The goal will be to limit access to the application to the general manager and space manager groups (done manually by the workspace application installer and not automatically)
At each change of role of a user to become a space manager, add or remove the corresponding user from this group:

  • at the time of adding a user to the workspace,
  • at the time of adding a user to a subgroup,
  • at the time of changing the role of a workspace member)

image

Differentiate between GG and GE roles

  • only GGs can execute the following actions:
  • set a quota for a workspace
  • rename a workspace
  • delete a workspace
  • create a workspace
  • GE should see only their workspaces (and GG see all workspaces)

Create a sub-group (group linked to a unique workspace)

  • Be able to create a subgroup to a workspace from the workspace management interface, via a "+" menu option, containing a subgroup creation icon and a highlighting of the selected option on mouseover

  • Display of a free field allowing the subgroup name to be entered at the time of the mouse click (no character limit)

  • Validate the creation of a sub-group via a validation arrow

  • Validate the creation of a sub-group by pressing the "Enter" key on your keyboard

  • Display directly the management interface of a sub-group when validating the name of the new sub-group

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.