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
1a2010a to
f8c8bb9
Compare
f8c8bb9 to
b01e169
Compare
|
After a discussion with @ridz1208, I realized that CandID should be treated like any other candidate identifier. To support this, I’ve made a small design change to how padding works. Since CandID doesn’t use padding, I thought it made more sense to make padding optional rather than introduce a I’ve updated the default PSCID structure and the migration script to explicitly specify padding where needed. I’ve also updated the unit tests and manually tested legacy CandID, PSCID and ExternalID generation to ensure the existing behaviour is preserved |
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.