Groups
Users of the app can be member of one or more groups. These groups and group memberships define which vehicles can be used by a user, how trips are charged, which features are available in the app and so on.
Fleet
A group can either have car configs directly associated to it (this means that
the field group
in the /carConfigs/{carConfigId}
is set to this group) or it
inherits the fleet (all car configs) of one or more other groups. In the latter case, the field
carGroup
in /groups/{groupId}
should refer to this group. In Control Center you can only configure to inherit the fleet from one group.
Group memberships
The groups a person is member of are defined in the database on the location
/persons/{personId}/groups
. You can view and/or edit the group memberships of a person in Control Center.
In the app there is always one active group that defines the current service and configuration
of the app (the available fleet, available pages, app behavior and certian visuals). When a person is member of
more than one group, they can switch between groups from the drawer menu (mobile) or
user account button (desktop).
When no user is logged in, the active group is the default group configured.
Group role
Each user has a specific role in a group that defines what they are allowed to do.
Currently, there are only two functionally different roles: user
and all others.
When the role is not specified in the group membership, user
is the default.
Users with the user
role can perform all default actions (making reservations,
using the cars, buying credits), while others cannot make reservations or use the car,
but they can buy credits and they see the available cars and calendars.
This reduced functionality can be used for users that have not yet completed their
registration (role=pending_user
), e.g. not yet payed for their cooperative share or not yet uploaded a
copy of their driving license, or are blocked (role=blocked
), e.g. because the did not
pay their bill.
Billing account
In the group membership, there is also a field that defines the billing account to be
used for trips made by the user under this group. When there is no personal billing
account defined in the group membership, the default billing account for the group, defined
on the group itself (/groups/{groupId}/billingAccount
) is used. If theere is no default billing account for the group defined the user has no billing account in its current group membership and will be able to do chargable actions like for example creating a reservation.
Admin role
A group member can also have an admin role, which defines what he can access in the control center. See also Access control in control center.
Use cases
Members of different groups see different cars
The same app can be used to support multiple groups with completely separated cars. Members of one group will see only the cars available for that group, while members of another group will see other cars. Some users can be member of both groups and will see different cars depending on which active group is currently selected in their app.
Members of different groups can book the same car at different times
The same physical car can be used by different groups, but on different days/times. For this, you can define different car configs, with non overlapping availabilities and associate them to different groups.
Bookings for a particular group can use the group billing account instead of a personal one
Some people can be member of a special group. For example, you can have a group for people doing maintenance. These people should have access to the same cars as the group for which they do maintenance, but when using a car for maintenance they should not be billed on their personal account, but instead a group account should be used.
Citizens of different cities have access to the same cars, but their default map viewport is different
When the same group has cars available in a larger area, the map with available
cars should not show the full area because then the user will have to zoom in
a lot before he can access a car. Instead, the map should show an area around the
users home location. To achieve this, members of the same group but living in different
cities can have a different config field in their group membership. The different
configs then define different mapCenter
's.
A particular group wants to see other group members' names in the booking calendar and keep them hidden for other users.
Give the people in the specific group a nickname (the name you want to be displayed in the calendar). The defined nickname will then be shown in the calendar of that car config. If another car config is linked to the same physical vehicle, users of that other car config won't see these names. They will see "this vehicle is reserved by another group." The nickname can be used, for example, to make the users of a local group visible to each other.