Users

Illustrated drawing of Amadeus Maxmimilian StadlerIllustrated drawing of Amadeus Maxmimilian Stadler

Amadeus Stadler

Published August 18, 2021

In order to collaborate on a project, multiple people need to be part of it. In this article, you will learn all about users in Mattrbld: how to add and manage them, how they are identified and where their details are stored.

What is a User?

In Mattrbld, the term user or member refers to a unique person working on a project. These users are identified by their email addresses, which means that every person with a unique email address who imports a project onto one of their devices becomes an individual member of that project. If that same person then imports the same project on a different device, they’ll still be the same user, assuming their email address didn’t change.

Mattrbld does not impose a limit on how many users can collaborate on a project, but since each of them will also have to be registered with your Git provider, you might be facing limits depending on your plan at said Git provider.

Each user is represented by a file in the .mattrbld/users folder, which holds basic information such as their name, role and email address.

If your repository is set to public, the .mattrbld folder, which contains the names and email addresses of you and your users, will be accessible to anyone on the internet! Since this is counted as personally identifying information, make sure you have the user’s consent before doing so.

If you would like to keep your repo public, Mattrbld doesn’t require the email addresses to be valid, so long as they are unique to every user, so you could use dummy addresses. Some Git providers like GitHub also provide their users with custom addresses to protect their privacy which can of course also be used in Mattrbld to protect their private addresses.

How to Join a Project

Whenever a user imports a project into Mattrbld, they will automatically join that project as a member—assuming, of course, that they have the right to access the project’s Git repository and are allowed to push to it. If they are the first to import it, they will be assigned the role of “Project Owner”, while every subsequent new member will be an “Content Editor” by default.

You can control this behaviour by explicitly creating users in the Users tab of the project settings. This will allow you to set their details and their role in the project, as well as give them a specific avatar image for that project, which will show in places like the recent updates section in the dashobard. If no avatar is uploaded, a custom avatar will be generated based on their details, which will always be the same, even on different devices.

All members of a project are listed in the Users tab, allowing you and collaborators with an access level of Project Owner or Developer to modify their details and remove them, as well as copy their individual invite links which they can use to easily join a project without having to know anything about Git or technical details.

Invite Links

Mattrbld’s invite links encode all information necessary to import a project in a single URL, which can be sent via Email or Messenger, or even turned into a QR code. Some of this information is optional, so you can use very specific invite links to invite individual users, or general invite links to invite groups of users via a single link.

Here’s the structure of an invite link:

// Formatted and URL encoding omitted
// for better legibility

https://app.mattrbld.com/import
?name=Example User
&email=user@example.com
&repo=https://git-provider.com/path/to/repo.git
&branch=main
&proxy=https://proxy-url.com
&inviter=Name of person inviting
&projectName=Name of the project

If you are using a self-hosted version of Mattrbld, you can just substitute the hostname of the URL for the one of your instance, just append /import to have it point to the special import route and assign the query parameters you need.

Only the repo and branch parameters are required. All others will fall back to default values or offer the user the option to input their own details before importing the project.

In order to avoid any unintentional mistakes, the email address in an invite link, if passed, will be displayed as read-only when the link is opened, but keep in mind that a tech savvy user will be able to just change the query parameter in the URL.

When copying an invite link from the Users tab, it will always contain all parameters, so to get a more general one, just remove those you don’t need.

Manually Adding Users

Anyone with access to the Users tab (so project members with an access level of Developer or Content Editor) will be able to add a user to the project by clicking the “Add user” button on the top right.

This will open a modal window, allows entering the name, email address and role of the new user, as well as uploading an individual user avatar for them.

Adding a user in Mattrbld does not automatically add them as a collaborator on the Git repository as well. Make sure the users you add have access to the repository by adding them in your Git provider’s UI before sending them their invite links!

If you would like to edit or remove a user after you have added them, you may do so by clicking on their entry in the list, which will bring up a modal window similar to the one for creating a new user. Editing an existing user might become necessary after new custom roles were added to a project.

Keep in mind that the only way to prevent a user from re-joining a Mattrbld project after they have been removed is to revoke their access to the repository at your Git provider.

Recap

A Mattrbld project can have a theoretically unlimited amount of members. Every member is identified by their unique email address. When importing a project, a user will always join that project as a member, assuming they have access to the Git repository and are allowed to push to it. To make it easy for non-technical users to import a project, an invite link can be generated for them, which allows them to import a project and join it with a single click.

Users are managed through the Users tab in the project settings and adding a user there is a great way to give them a default role other than “Content Editor” when they join the project. The next article will go more into details about roles and how to add custom ones to a Mattrbld project.