pub async fn create(
pool: &PgPool,
actor: &Actor,
code: &str,
name: &str,
description: &str,
oidc_group: Option<&str>,
visibility: ProjectVisibility,
) -> AppResult<Project>Expand description
Creates a project group. CAD editors and administrators may do so; a CAD editor becomes member and manager of the new group.
ยงInvariants
- Permission: editor role or higher (403 otherwise); linking an identity-provider group is for administrators only (403).
- Locks: none; a duplicate code is refused by the unique index (409).
- Data: a non-administrator creator is added as a manual member and manager; administrators manage every group and are not added.
- Audit:
project.create. - Notifications / webhooks: none.
- Atomic: one transaction.