----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72894/#review221921 -----------------------------------------------------------
intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java Line 753 (original) <https://reviews.apache.org/r/72894/#comment310974> I suggest to not remove this validation from here. BTW, has this validation been moved to else where? repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java Lines 77 (patched) <https://reviews.apache.org/r/72894/#comment310971> 'subTypes' is a read-only/computed field. It is ignored during create/update operations. Please remove subTypes from 'typeNames'. repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java Lines 80 (patched) <https://reviews.apache.org/r/72894/#comment310972> verifyReadAccessForSuperAndSubTypes() => verifyTypeReadAccess() repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java Lines 379 (patched) <https://reviews.apache.org/r/72894/#comment310973> When multiple classifications are created in one REST call, typeRegistry.getTypeDefByName(typeName) will return null when typeName is one of the newly created type. For example: { "classificationDefs": [ { "name": "tagBase" }, { "name": "tagDerived", "superTypes": [ "typeBase" ] } ] } Please validate above. - Madhan Neethiraj On Sept. 22, 2020, 10:59 a.m., Nixon Rodrigues wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72894/ > ----------------------------------------------------------- > > (Updated Sept. 22, 2020, 10:59 a.m.) > > > Review request for atlas, chaitali, Jayendra Parab, Madhan Neethiraj, Nikhil > Bonte, and Sarath Subramanian. > > > Bugs: ATLAS-3952 > https://issues.apache.org/jira/browse/ATLAS-3952 > > > Repository: atlas > > > Description > ------- > > This patch consist two fixes. > 1) Authorize Super And SubTypes and entityType for type-read access before > creating Classificationdef. > 2) Move create-type access check before duplicate "Given type _ already > exists" validation. > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 4a79b6fd5 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java > 9ffede4e3 > > > Diff: https://reviews.apache.org/r/72894/diff/1/ > > > Testing > ------- > > Tested creating classification while superTypes/ subTypes and entityType with > valid/invalid read-Type access. > Testing duplicate classification while valid/invalid create-type access. > > > Thanks, > > Nixon Rodrigues > >