Association between user and farm

The relationship between a user and a farm is defined, at the highest level, by the role that user plays at the farm. The role can be thought of as the verb that ties the user and the farm together. For example, John owns a farm, Jane manages a farm, and Tony works on a farm. Users may play different roles at different farms. These roles correspond to the roles defined in . Here are three common use cases where a user would have associations with different farms:

  1. An individual that wishes to become a farm owner will apprentice as a farm manager at someone else’s farm.

  2. A farm worker may be a worker at several different farms throughout a given season.

  3. A certification technician may inspect many farms each year for compliance.

For this reason, it’s important that Lite Farm support the ability for a user to be associated with any number of farms. For each association, the user may have a different role.

Litefarm must support the following multi-role flows:

^ Registration flow

^ Multi-farm log-in flow

^ Receiving an invitation flow

 

Architectural Guidance

High level architecture guidance

Open Questions

Open Questions

Discussion

Decisions

Open Questions

Discussion

Decisions

Where should user settings / configurations be held?

It depends. Obviously user-centric configurations such as language should be held on the user.

Settings that may vary from role to role, such as permissions to read/write should be stored on the user-farm.

Other, farm specific settings such as measuring system* and currency should be stored on the farm settings.

 

Can a user play more than one role at a single farm?

Depends on our implementation of RBAC.

HW: a manager will also want be able to log hours of ‘work’. role might also change over time. What is important is that the primary farm account (i.e the ‘owner’) controls who has access at any given point, and can invite/reject other users from the main farm account.

So what would that process look like where a primary farm ‘invites’ people as workers, technicians, researchers, etc, to ‘join their farm team’ in a particular role?