Feat/cawg named roles#390
Open
digisumit wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR contains the following change(s):
Add support for displaying CAWG named roles in "About this Content Credential"
What
Reads and displays CAWG named roles from C2PA manifests in the verify sidebar's About section, below "Issued on".
Supported roles: Creator, Contributor, Editor, Producer, Publisher, Sponsor, Translator.
How
Roles are extracted from two assertion sources and merged:
cawg.metadata— Dublin Core fields (dc:creator,dc:contributor,dc:publisher)cawg.identity—signer_payload.role[]array ofcawg.*role strings; the role holder's name is taken from the identity issuerWhen the same role appears in both sources, the
cawg.metadataname takes precedence. Assertion labels are matched withstartsWithto tolerate JUMBF hash suffixes.Files changed
src/lib/selectors/cawgRoles.tsselectCawgRoles(manifest): RoleEntry[]src/lib/selectors/cawgRoles.spec.tssrc/lib/asset.tscawgRoles: RoleEntry[]toManifestData; populated from selectorsrc/routes/.../AboutSection/CAWGRolesSection.sveltesrc/routes/.../AboutSection/AboutSection.svelteCAWGRolesSectionafter "Issued on"locales/en-US.jsonsrc/lib/selectors/reviewRatings.tsas anycast with proper interfacesrc/lib/selectors/website.tsas anycast with proper interfaceChecklist
Issue link (optional)
Please insert link(s) to any related issue(s) here