Team Functionality
Enable Multi-User Collaboration in Workspaces on OpnForm
Background
OpnForm is already is built around workspaces - with collaboration in mind. However, it currently only supports a single-user per workspace. This issue aims to extend the current functionality to allow multiple users to collaborate within a single workspace.
Features to Implement
User Listing in Workspace Settings
- Location: Workspace settings page OpnForm Workspace Settings
- Implementation: Use the Nuxt UI table to list users.
- Details:
- Display columns for
User Name,Email, andRole.
- Display columns for
Invite User Functionality
- Visibility: Only available to admins.
- Features:
- Directly add registered users to the workspace.
- Send an invitation email to unregistered users to join OpnForm. A draft email will should included in the pull request for further refinement by ourselves.
Promote User to Workspace Owner
- Functionality: Add a button to promote a user to the role of workspace owner.
- Confirmation: Require confirmation via a dialog box.
Remove User from Workspace
- Constraints: Users cannot remove a workspace owner.
- Confirmation: Require confirmation via a dialog box.
Adjust Workspace Leaving Mechanics
- Condition: Change functionality if the workspace has more than one user.
- Replace the “Remove workspace” button with “Leave the workspace”.
- Adjust the backend to support this new action.
Technical Considerations
- Authorization: Use Laravel policies for authorization/permissions checks.
- Controller: Implement a
WorkspaceUserControllerfor managing workspace-related user actions (invite user, remove, promote etc). - Routing: API routes should be prefixed with
workspaces/{id}/users. - We currently have only 2 roles:
userandadmin, but we will soon add more ('reader' who won't be able to create/edit forms for instance). So as part of this PR, let's change the booleanis_owneron theuser_workspacetable and replace it with arolestring. In the migration doing this, make sure to assign the roleadminto existing users. You should also create aUserWorkspacemodel and relationships (at least with the User model) to simplify access to roles
Expected Benefits
This enhancement will support collaborative efforts among users in a single workspace, improving productivity and user satisfaction on our platform.
/bounty $200
I would like to give a try on this 🙋 /attempt #406
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @ezhil56x | 25 bounties from 10 projects | JavaScript, TypeScript, Rust & more |
Cancel attempt |
I managed to setup OpnForm in my local dev environment
Started api server with php artisan serve and client with npm run dev
I tried adding the following in .env of client
NUXT_PUBLIC_APP_URL=http://localhost:3000
NUXT_PUBLIC_API_BASE=http://127.0.0.1:8000
I am getting the following error, when I try to signup. I think still the client is not using the api. How can I fix this?
WARN [Vue Router warn]: No match found for location with path "/user"
@ezhil56x are you still working on the issue
[!NOTE] The user @ezhil56x is already attempting to complete issue #406 and claim the bounty. We recommend checking in on @ezhil56x's progress, and potentially collaborating, before starting a new solution.
@LL-Etiane Waiting for a reply from maintainer
Hi @ezhil56x can you inspect the page and check the network tab to see where the request is being sent? Can you try pinging the back-end with a tool like postman?
Any logs in storage/laravel.log?
@ezhil56x I had similar error, Went ahead and manually set the env variable from terminal but if you run with docker it will work well
Using windows
Will try troubleshooting in both ways, thanks!
@ezhil56x: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏
@JhumanJ @LL-Etiane
Doesn't seem to work. The request is being sent to http://localhost:3000/user instead of http://127.0.0.1:8000/user. Is there any other way I can fix this issue
Hi...I am interested in this. Has it been resolved yet?
Working on it Have done the tasks. One bug is holding from completing. When a full page reload is done, the workspaces users are not loaded well
Working on it Have done the tasks. One bug is holding from completing. When a full page reload is done, the workspaces users are not loaded well
Alright. Kudos
Bounty paid to @LL-Etiane outside of Algora since he is in a location not supported by Stripe :( Thanks for the great work! PR: https://github.com/JhumanJ/OpnForm/pull/416