Skip to content

Commit

Permalink
Initial implementation of Groups (CFM-38, CFM-39, CFM-40, CFM-41, CFM…
Browse files Browse the repository at this point in the history
…-176)
  • Loading branch information
Benn Oshrin committed Jun 16, 2022
1 parent fe8bb14 commit 0b463b8
Show file tree
Hide file tree
Showing 61 changed files with 3,781 additions and 171 deletions.
75 changes: 72 additions & 3 deletions app/config/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"description": { "type": "string", "size": 128 },
"external_identity_id": { "type": "integer", "foreignkey": { "table": "external_identities", "column": "id" } },
"external_identity_role_id": { "type": "integer", "foreignkey": { "table": "external_identity_roles", "column": "id" } },
"group_id": { "type": "integer", "foreignkey": { "table": "groups", "column": "id" } },
"id": { "type": "integer", "autoincrement": true, "primarykey": true },
"language": { "type": "string", "size": 16 },
"name": { "type": "string", "size": 128, "notnull": true },
Expand Down Expand Up @@ -215,6 +216,70 @@
}
},

"groups": {
"columns": {
"id": {},
"co_id": {},
"cou_id": {},
"name": {},
"description": { "size": 256 },
"open": { "type": "boolean" },
"status": {},
"group_type": { "type": "string", "size": 2 },
"nesting_mode_all": { "type": "boolean" }
},
"indexes": {
"groups_i1": { "columns": [ "co_id" ] },
"groups_i2": { "columns": [ "co_id", "name" ] },
"groups_i3": { "columns": [ "co_id", "group_type" ] },
"groups_i4": { "columns": [ "cou_id", "group_type" ] },
"groups_i5": { "columns": [ "cou_id" ], "comment": "Not really needed but DBAL autogenerates"}
}
},

"group_nestings": {
"columns": {
"id": {},
"group_id": { "comment": "Calling this 'source_group_id makes things complicated'" },
"target_group_id": { "type": "integer", "foreignkey": { "table": "groups", "column": "id" } },
"negate": { "type": "boolean" }
},
"indexes": {
"group_nestings_i1": { "columns": [ "group_id" ] },
"group_nestings_i2": { "columns": [ "target_group_id" ] }
}
},

"group_members": {
"columns": {
"id": {},
"group_id": {},
"person_id": {},
"valid_from": {},
"valid_through": {},
"group_nesting_id": { "type": "integer", "foreignkey": { "table": "group_nestings", "column": "id" }}
},
"indexes": {
"group_members_i1": { "columns": [ "group_id" ]},
"group_members_i2": { "columns": [ "person_id" ]},
"group_members_i3": { "columns": [ "group_id", "person_id" ]},
"group_members_i4": { "columns": [ "group_nesting_id" ]}
}
},

"group_owners": {
"columns": {
"id": {},
"group_id": {},
"person_id": {}
},
"indexes": {
"group_owners_i1": { "columns": [ "group_id" ]},
"group_owners_i2": { "columns": [ "person_id" ]},
"group_owners_i3": { "columns": [ "group_id", "person_id" ]}
}
},

"names": {
"columns": {
"id": {},
Expand Down Expand Up @@ -300,7 +365,7 @@
"identifiers_i2": { "columns": [ "identifier", "type_id", "external_identity_id" ] },
"identifiers_i3": { "columns": [ "type_id" ] }
},
"mvea": [ "person", "external_identity" ],
"mvea": [ "person", "external_identity", "group" ],
"sourced": true
},

Expand Down Expand Up @@ -344,14 +409,18 @@
"person_role_id": {},
"external_identity_id": {},
"external_identity_role_id": {},
"actor_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } }
"group_id": {},
"actor_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } },
"actor_api_user_id": { "type": "integer", "foreignkey": { "table": "api_users", "column": "id" } }
},
"indexes": {
"history_records_i1": { "columns": [ "person_id" ] },
"history_records_i2": { "columns": [ "external_identity_id" ] },
"history_records_i3": { "columns": [ "actor_person_id" ] },
"history_records_i4": { "columns": [ "person_role_id" ] },
"history_records_i5": { "columns": [ "external_identity_role_id" ] }
"history_records_i5": { "columns": [ "external_identity_role_id" ] },
"history_records_i6": { "columns": [ "group_id" ] },
"history_records_i7": { "columns": [ "actor_api_user_id" ] }
}
}
},
Expand Down
12 changes: 12 additions & 0 deletions app/resources/locales/en_US/controller.po
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ msgstr "{0,plural,=1{External Identity} other{External Identities}}"
msgid "ExternalIdentityRoles"
msgstr "{0,plural,=1{External Identity Role} other{External Identity Roles}}"

msgid "GroupMembers"
msgstr "{0,plural,=1{Group Member} other{Group Members}}"

msgid "GroupNestings"
msgstr "{0,plural,=1{Group Nesting} other{Group Nestings}}"

msgid "GroupOwners"
msgstr "{0,plural,=1{Group Owner} other{Group Owners}}"

msgid "Groups"
msgstr "{0,plural,=1{Group} other{Groups}}"

msgid "HistoryRecords"
msgstr "{0,plural,=1{History Record} other{History Records}}"

Expand Down
24 changes: 24 additions & 0 deletions app/resources/locales/en_US/defaultType.po
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,30 @@ msgstr "Official"
msgid "Names.preferred"
msgstr "Preferred"

msgid "PersonRoles.affiliate"
msgstr "Affiliate"

msgid "PersonRoles.alum"
msgstr "Alum"

msgid "PersonRoles.employee"
msgstr "Employee"

msgid "PersonRoles.faculty"
msgstr "Faculty"

msgid "PersonRoles.librarywalkin"
msgstr "Library Walk-In"

msgid "PersonRoles.member"
msgstr "Member"

msgid "PersonRoles.staff"
msgstr "Staff"

msgid "PersonRoles.student"
msgstr "Student"

msgid "Urls.official"
msgstr "Official"

Expand Down
25 changes: 25 additions & 0 deletions app/resources/locales/en_US/error.po
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ msgstr "This record is read only and cannot be edited"
msgid "exists"
msgstr "{0} already exists with this name"

msgid "exists.GroupMember"
msgstr "{0} is already a member of Group {1}"

msgid "fields"
msgstr "Please recheck these fields: {0}"

Expand All @@ -93,6 +96,28 @@ msgstr "The Primary Link {0} is frozen and cannot be changed"
msgid "file"
msgstr "Cannot read file {0}"

# Used to construct flash message for field errors
msgid "flash"
msgstr "{0}: {1}"

msgid "GroupNestings.active"
msgstr "Group {0} is not active and so cannot be nested"

msgid "GroupNestings.automatic"
msgstr "Group {0} is an automatic Group and so cannot be a nesting target"

msgid "GroupNestings.exists"
msgstr "Group is already nested into this target"

msgid "GroupNestings.loop"
msgstr "Target group is already nested into this Group"

msgid "GroupNestings.same"
msgstr "Group cannot be nested into itself"

msgid "Groups.nested"
msgstr "Group is nested or has nestings, and cannot be suspended or deleted"

msgid "input.blank"
msgstr "Value cannot consist of only blank characters"

Expand Down
42 changes: 42 additions & 0 deletions app/resources/locales/en_US/field.po
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,51 @@ msgstr "Map the extended affiliation to this eduPersonAffiliation, see <a href="
msgid "family"
msgstr "Family Name"

msgid "GroupMembers.source"
msgstr "Membership Source"

msgid "GroupMembers.source.direct"
msgstr "Direct"

msgid "GroupNestings.group_id"
msgstr "Nested Group"

msgid "GroupNestings.negate"
msgstr "Negate Nesting"

msgid "GroupNestings.negate.desc"
msgstr "If true, members of the Nested Group will not be eligible to be a member of the Target Group"

msgid "GroupNestings.target_group_id"
msgstr "Target Group"

msgid "Groups.desc.admins"
msgstr "{0} Administrators"

msgid "Groups.desc.members"
msgstr "{0} Members"

msgid "Groups.desc.members.active"
msgstr "{0} Active Members"

msgid "Groups.nesting_mode_all"
msgstr "Require All for Nested Memberships"

msgid "Groups.nesting_mode_all.desc"
msgstr "For membership in this Group via Nested Groups, require membership in <i>all</i> Nested (Source) Groups to be a member of this Group (instead of <i>any</i>)"

msgid "Groups.open"
msgstr "Open"

msgid "Groups.open.desc"
msgstr "Open groups may be self-joined by any Person in the CO"

msgid "given"
msgstr "Given Name"

msgid "group_membership"
msgstr "{0} Membership in {1}"

msgid "honorific"
msgstr "Honorific"

Expand Down
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/operation.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ msgstr "Make Primary"
msgid "Types.restore"
msgstr "Add/Restore Default Types"

msgid "reconcile"
msgstr "Reconcile"

msgid "remove"
msgstr "Remove"

Expand Down
33 changes: 33 additions & 0 deletions app/resources/locales/en_US/result.po
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,39 @@ msgstr "{0} {1} Deleted: {2}"
msgid "edited.mvea"
msgstr "{0} {1} Edited: {2}"

msgid "Groups.added"
msgstr "Group {0} created"

msgid "Groups.deleted"
msgstr "Group {0} deleted"

msgid "Groups.edited"
msgstr "Group {0} edited: {1}"

msgid "Groups.reconciled"
msgstr "Membership for group reconciled"

msgid "GroupMembers.added"
msgstr "Added {0} to group {1}"

msgid "GroupMembers.added.nesting"
msgstr "Added {0} to group {1} via nesting of group {2} ({3})"

msgid "GroupMembers.deleted"
msgstr "Removed {0} from group {1}"

msgid "GroupMembers.deleted.nesting"
msgstr "Removed {0} from group {1} via nesting of group {2} ({3})"

msgid "GroupMembers.edited"
msgstr "Membership for {0} in group {1} edited: {2}"

msgid "GroupOwners.added"
msgstr "Added {0} as an owner of group {1}"

msgid "GroupOwners.deleted"
msgstr "Removed {0} as an owner of group {1}"

msgid "saved"
msgstr "Saved"

Expand Down
Loading

0 comments on commit 0b463b8

Please sign in to comment.