ProjectGroupMappingModel
Defined in: packages/core/src/models/project-group-mapping.ts:16
Data operations for identity-provider group mappings.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProjectGroupMappingModel(
db,tables?):ProjectGroupMappingModel
Defined in: packages/core/src/models/project-group-mapping.ts:24
Parameters
Section titled “Parameters”Database adapter.
tables?
Section titled “tables?”ProjectGroupMappingTables
Table handles.
Returns
Section titled “Returns”ProjectGroupMappingModel
Methods
Section titled “Methods”create()
Section titled “create()”create(
projectId,groupName,role):Promise<ProjectGroupMapping>
Defined in: packages/core/src/models/project-group-mapping.ts:50
Create a group mapping for a project.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
groupName
Section titled “groupName”string
"admin" | "viewer" | "approver" | "developer"
Returns
Section titled “Returns”Promise<ProjectGroupMapping>
list()
Section titled “list()”list(
projectId):Promise<ProjectGroupMapping[]>
Defined in: packages/core/src/models/project-group-mapping.ts:30
List all group mappings for a project.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<ProjectGroupMapping[]>
remove()
Section titled “remove()”remove(
projectId,id):Promise<void>
Defined in: packages/core/src/models/project-group-mapping.ts:65
Remove a group mapping by id within a project.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
string
Returns
Section titled “Returns”Promise<void>
inputError()
Section titled “inputError()”
staticinputError(groupName,role):string|null
Defined in: packages/core/src/models/project-group-mapping.ts:40
Validate group-mapping input; returns an error message, or null when acceptable. Names match exactly: a wildcard would silently grant org-wide access.
Parameters
Section titled “Parameters”groupName
Section titled “groupName”string | undefined
string | undefined
Returns
Section titled “Returns”string | null