Repository navigation
Conversation
cb0c78e to
649dd44
Compare
What is the reasoning for this? I get that one permission makes it easier to implement which makes sense, but if that's a permanent design decision then why have a separate rel table instead of just a column in the identifier type table to list the one permission? As for a permission only being allowed to be associated with one identifier type.. why? Multiple different related identifier types having the same permission seems reasonable and I can't think of any way that adding this restriction would simplify the implementation. |
Yes, thank you for bringing it up. What I meant is that an identifier type can have at most one permission, but the same permission can be used by multiple identifier types. With that relationship, I think your point about the separate relation table makes sense too. Since it’s many to one, permID could just be a nullable foreign key on the identifier type table. The relation table would only really be needed if we wanted multiple permissions per identifier type later. |
a617af0 to
93e2302
Compare
b029f3e to
2d7b64d
Compare
ccccd57 to
e24e671
Compare
bd10df2 to
77c473b
Compare
065758a to
907bd33
Compare
155e719 to
20b169d
Compare
a0ead00 to
ab37403
Compare
ab37403 to
1a2010a
Compare
Brief summary of changes
This PR adds the models, controllers, and identifier generation logic for the candidate identifier rework.
It allows LORIS to manage multiple identifier types, each with their own format, validation rules, uniqueness settings, and project associations.
This PR depends on #11209.
Changes
Testing Instructions
Run the unit tests for
IdentifierTypeController,CandidateIdentifierController, andCandidateIdentifierGenerator:Verify that identifier types and their project associations can be retrieved correctly.
Check that identifiers can be created, retrieved, updated, and deleted through
CandidateIdentifierController.Verify that identifier values are validated against their configured formats.
Check that duplicate values are rejected for identifier types marked as unique.
Verify that multiple values of the same type are only allowed when
AllowMultipleis enabled.Test sequential and random identifier generation with different formats, prefixes, padding, and minimum and maximum values.
Run the existing identifier tests to check that the changes do not break the previous functionality.