Skip to main content

Module projects

Module projects 

Source
Expand description

Project groups (e.g. a product line, a machine, a customer project or a rover). CAD editors may only modify items of the project groups they are members of.

Groups are self-service: every CAD editor can create one and becomes its manager; managers (and administrators) edit the group and its members. Linking a group to an identity-provider group (oidc_group, synchronised at every SSO login) stays with the administrators, because it grants membership to people outside TeamCraft’s control.

Structs§

FormerHolder
Somebody who still holds check-outs in a group without being a member of it any more (removed, or never one before the group was restricted).
NextNumber
NumberingPreview
What a numbering scheme gives in a project group.
ProjectUpdate

Functions§

add_member
Adds a user to a project group (managers and admins); manager makes them a manager as well (an existing member is updated).
can_manage
Whether the actor maintains the group: administrators always, otherwise the members marked as manager.
create
Creates a project group. CAD editors and administrators may do so; a CAD editor becomes member and manager of the new group.
demote_manager
Lowers a manager to a plain member (managers and admins): the member keeps the membership and its source, so this works for IdP-synchronised memberships too, which cannot be removed while their user is active.
editable_by
Active projects in which the actor may create and modify items.
former_holders
The non-members holding check-outs in a group, for the managers’ member list: their locks are orphaned and a manager may release them (checkouts::release_held). Bounded to 200 people.
get
A project group the actor may see (restricted groups answer “not found” to non-members).
get_by_code
A project group by code, if the actor may see it; a hidden group gives the message of an unknown code.
get_by_code_for_management
get_for_management by code.
get_for_management
A project group for its maintenance (members, policy, settings): like get, but an administrator also reaches a group their need-to-know policy hides. The record holds no content of the group.
is_manager
For pages: whether the actor may maintain the group.
list
The project groups the actor may see: restricted groups only for their members and administrators.
list_managed
Every project group, for the project overview of an administrator who manages groups they may not read (need-to-know policy): names, codes and member counts are management data, not content.
members
memberships_of
Projects a user is a member of.
numbering_preview
The numbers the next new items would get with scheme (the project’s own scheme when None), without using up any. Manually entered numbers that are already taken are skipped when an item is created, so the real number can be higher.
remove_member
Removes a member (managers and admins; everybody may leave a group). A manager cannot leave while no other active manager remains – an admin can still remove them. Returns how many check-outs the user still holds in the group.
restricted_memberships
The actor’s own memberships whose group is restricted.
set_member_expiry
Sets or clears when a membership is meant to end (“member until”, issue #173 step 8). Only a flag on the season page: nothing removes the member when the date has passed.
set_number_scheme
Sets the numbering scheme of a project group (managers and admins); an empty scheme returns to the built-in {TYPE}-{SEQ:6}. Existing item numbers never change.
set_visibility
Restricts a group to its members or opens it to all users again (managers of the group and administrators).
update
Changes name, description, active flag and (administrators only) the linked identity-provider group of a project group.