Skip to content

Commit 1f080df

Browse files
Add schema info and builder for CO Roles
1 parent bca35a7 commit 1f080df

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

comanage_person_schema_utils.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@
5858
}
5959

6060

61+
ROLE = {
62+
"cou_id": None,
63+
"title": "",
64+
"o": "",
65+
"ou": "",
66+
"valid_from": None,
67+
"valid_through": None,
68+
"status": "A",
69+
"sponsor_co_person_id": None,
70+
"affiliation": "member",
71+
"ordr": 1,
72+
}
73+
74+
6175
EMAIL_ADDRESS = {
6276
"mail": None,
6377
"type": None,
@@ -162,6 +176,14 @@ def co_person_org_id(
162176
return org_id
163177

164178

179+
def co_person_role(cou, title, affiliation, order):
180+
role = ROLE.copy()
181+
role["cou_id"] = cou
182+
role["title"] = title
183+
role["affiliation"] = affiliation
184+
role["ordr"] = order
185+
return role
186+
165187
def co_person_email_address(mail, type="delivery", verified=False):
166188
email = EMAIL_ADDRESS.copy()
167189
email["mail"] = mail

0 commit comments

Comments
 (0)