Home
Author Manual
Builder Manual
Development

User Group

A fpm package can limit who has read or write access. We do it by organising a set of user identities using user group and then using the user group in the sitemap.

User groups are defined in any package by using fpm.user-group:

FPM.ftd
-- import: fpm
-- fpm.package: amitu.com

-- fpm.user-group: fifthtry-people
title: FifthTry People
email-domain: fifthtry.com
github-team: FifthTry/everyone

Description-Body: This group is for FifthTry People

This creates a new user-group, whose unique id is fifthtry-people.

The id of every user-group must be unique in a given package.

Group Properties
A group have different properties like id, title, description and identities.

id
id which should be unique for a package

title
title is a optional key in user-group.

description
description is a optional body in user-group.

Identities
Identities in a user-group contains email, -email, group, -group, etc…

All Supported Identities

These are all supported identities for fpm.user-group.

  • email
  • -email
  • domain
  • -domain
  • telegram
  • -telegram
  • github
  • -github
  • github-team
  • -github-team
  • discord
  • -discord
  • group
  • -group

How To Create Group with Multiple Identities
In the below group, email key can be used multiple times, -email means that do-not-include-email and for other identities as well.

User Group
fpm.user-group:
email: abrark@fifthtry.com
-email: amitu@fifthtry.com
email: shobhit@fifthtry.com
discord: abrark#12345
domain: @fifthtry.com
-domain: @foo.com
github: abrark
github-team: abrarnitk/team-a

Re-using groups
User groups can be imported from other packages as well.

FPM.ftd
-- import: fpm
-- fpm.package: amitu.com/python
-- fpm.dependency: amitu.com

-- fpm.user-group: fifthtry-people
group: amitu.com/fifthtry-people
email: gvr@gmail.com

Here we have created a group “fifthtry-people”, by importing the definition from amitu.com/fifthtry-people and we have added another email address to this group.

We can use group as many times as we want, it must refer to a group defined in another package. To import we have to add the other package as a dependency first as shown above.

Removing Some People When Importing
We can also remove some of the users defined in the group that is being imported.

FPM.ftd
-- import: fpm
-- fpm.package: amitu.com/python
-- fpm.dependency: amitu.com

-- fpm.user-group: fifthtry-people
group: amitu.com/fifthtry-people
-email: foo@bar.com
email: gvr@gmail.com
github: abrarnitk
This will combine all group and other group identities, but except ones will be explicitly removed from the combined set.

How to Use User Groups In Sitemap
Please check this