Feature/signing-bugfix#3345
Merged
HauklandJ merged 2 commits intofeature/signingfrom May 9, 2025
Merged
Conversation
|
bjorntore
approved these changes
May 8, 2025
HauklandJ
added a commit
that referenced
this pull request
May 14, 2025
* Signee List Component (#2807) * WIP * adds zod * adds start of signee list component * makes app table type generic * renders tag in table for signee status * adds header styling to signee list table * adds todos and some error handling * removes fake prop in schema to trigger parsing error * moves signee state tag component to its own file * adds language and error message when process task is not a signing task * fixes caption helptext display * added support for caption, description and helptext and sized table to md * adds support for organisation signature * adds lang texts for table header * adds sorting on name column * updates todos and removes unnecessary accessors * right aligns the last column * updates TODOs * removes not found and unnecessary caption font-size * smaller improvement to error handling * adds custom error message to refine * simplifies error handling * fixes css classes * adds support for is loading status in table and signee table * extracts signee list error component to its own file * fixes codeql warning and adds test for getSigneeStatus * moves data fetching function and related code out of component file * adds api tests * adds stale time and simplifies signee list query object * fixes moved import * fixes org lookup css classes * adds signee list component unit tests * code review cleanup * add datamodelbinding for surname for personlookup (#2866) * add datamodelbinding for surname for personlookup * rm surname datamodelbinding and compose fullname * update validation of person lookup name * rm surname from datamodelbindings * validate first and last name * validate tempName inline * Update src/layout/PersonLookup/PersonLookupComponent.tsx Co-authored-by: Camilla Marie Dalan <camillamdalan@gmail.com> --------- Co-authored-by: Camilla Marie Dalan <camillamdalan@gmail.com> * Documents to Sign List (#2830) * WIP signing document list * adds support for selflinks apps blob url * adds support for attachment type in table * moves error component to own file * supports loading in signing doc list table * adds error message when component is used in a non signing task * fixes cypress test * fixes import error * moves api stuff out to api file * adds tests for signing document list component * code review fixes * removes filtering of documents to sign and sets filename to datatype if no set filename (#2910) * scaffold for summary2 for signing components * add signeelist summary * add summary for signing documents list * placeholder for no signatures found * language support for download button * use signingDocumentList as summary, use Lang and Paragraph * fix tests * Feature/signing cta (#2890) * Signing panel scaffolding * fixes tests * updates eslint rules for test files * fixes function name casing * makes panel full width by default and moves full width and conditional wrappers to app-components * implements functions and cleans up code * removes reject button in mvp * renames waiting status in current user status * replaces signee list staleTime with refetchInterval and added padding to signing panel * adds deprecated warning to getDataValidationUrl * uses css classes instead of inline css * adds text resource defaults * fixes spacing in panel and alignment of checkbox and label * adds checkbox label and description config to layout component * fixes signing document list component test * adds all text resources as props for override capability * renames go_to_inbox -> no_action_required * adds reject button to panel if user has reject rights * adds text resource binding props and text resource defaults for reject signing process modal * ignore layout config.ts files for sonarcloud * renames SubmitPanel -> PanelSubmit renames SigningPanel -> PanelSigning, NoActionRequiredPanel -> PanelNoActionRequired and AwaitingCurrentUserSignaturePanel -> PanelAwaitingCurrentUserSignature * splits submit panel in awaiting other signatures panel and submit panel with corresponding text resource changes * returns no action required panel * fixes inverted logic error * QA fixes * removes redundant tests * fixes document list test * remove description for signing document summary * fetch status from current user, not instance owner (#2931) * Signing backend validation (#2930) * runs backend validation on signee list refetch * invalidates signee list on sign * Render signe state for signee list summary, await fetching queries before #readyforprint (#2939) * useEffect instead of useQuery * separate rendering based on useQuery response * polish summary * update ready for print to wait for fetching queries to be idle * fixes current party id * fixes signee list cache invalidation on task change * update apptable to support Lang element to display when there is no data (#2950) * update apptable to support Lang element to display when there is no data * update design after consulting with designers * Update src/language/texts/nn.ts Co-authored-by: Camilla Marie Dalan <camillamdalan@gmail.com> --------- Co-authored-by: Camilla Marie Dalan <camillamdalan@gmail.com> * shows signing button if user has not signed and has signing access (#2974) * Signing CTA error state (#2936) * adds error panel when delegation is unsuccessful for one or more signees * handles both delegation and api errors * small cleanup * adds some SigningStatusPanelComponent tests * updates texts * uses current party id for message box url in no action required panel * renames partyId param to instanceOwnerPartyId * Signing CTA fixes (#3016) * prevents double clicking submit buttons * always refetches signeeList on mount * Fix missing submit button when user can sign, but isn't required (#3030) * shows submit button in awaiting current user signature panel if can write and no missing signatures * adds test for new case and fixes structure * minor wcag improvements * invalidate all signing queries on sign server action (#3036) * Updates signee notification status from backend (#3044) * updates notification status from backend * notificationSuccessful -> notificationStatus * updates the signing pdf with styling and signature timestamp (#3045) * updates the signing pdf with styling and signature timestamp * uses correct elements and fixes styling * adds test for signeelistsummary * makes signature description italic * adds missing signedTime property in test * fix test * uses mutation status for disabling buttons * updates captions/label sizes for signing and signing summary * renames returnUrlToMessageBox to getMessageBoxUrl and gets window.location.host inside function * [Signing] Signee list summary override (#3088) * adds signee list summary override for title * fixes and adds new tests * filters app:owned data elements from shown attachments in local receipt * updates tests and api * converts timestamp string to zoned date and formats * updates yarn.lock * fix import path for conditionalwrapper * add expression support for organisation instance owner name (#3232) * deletes unused hook * improves PartySelection error message * gets instance owner party from backend and correctly determines on behalf of in app header * fixes eslint warning * adds enabled prop to instance owner query, and improves useInstanceOwner logic and readablility * gets instance owner party from new data on instance from backend with fallback to finding it in parties * removes cookie utils * add expression support for organisation instance owner name * update tests * add shared-tests * expose instace owner name always * fixes flattening parties and checking if same party by partyId in app header * fixes sonarqube maintainability complaint * fixes another sonarqube maintainability complaint * removes unused query key * gets instance owner name straight from cache instead of zustand which might have been overwritten * gets instance owner data from cache instead of performing another query --------- Co-authored-by: Camilla Marie Dalan <camillamdalan@gmail.com> * memoize the built instance data sources * dummy commit * Allow user to choose which party to sign on behalf of (#3169) * scaffolding, commented out code, and generally chaos * update yarn lock * add onBehalfOf to doPerformAction query * update schema * update the org check logic * update the change handle on the radio group to set the orgnr for the value * add text resources for signing panel radio group * rm commented out code * use fieldset instead of radio group * pr feedback * different views for different on behalf of * make header smaller for single choice org on behalf of * organisation -> organization for compatibility with new backend * move onhebalfofchooser, make state nullable (#3273) * move onhebalfofchooser, make state nullable * set on behlaf of for single choice * calculates current user signees based on signee list and authorized orgs * adds current user to onbehalfofchooser * fixes summary title override for signee list and documents list * fixes awaiting current user signature panel logic * smaller fixes * makes signing status panel action type component instead * improves api use and fixes tests * some restructuring and test cleanup * makes submit button not disabled, but shows error message instead if clicked and there are missing signatures * renames SigningStatusPanel -> SigningActions * renames currentParty -> selectedParty and uses profile instead of selectedParty for signing components * updates tests with the fix * British to American English in Signing (#3322) * switches from british to american spelling of organization * authorised -> authorized * Adds error messages instead of disabled button (#3324) * makes minor improvements and adds error messages instead of disabled button for signing * fixes tests * flattens text resources for signing * removes lang import in app-components * removes rouge C from selected party provider * removes unused nodeid prop * renames file with spelling error * Feature/signing-bugfix (#3345) * if user has signed as itself or on behalf of org, disallow role based signing * update tests --------- Co-authored-by: Johannes Haukland <42615991+HauklandJ@users.noreply.github.com> Co-authored-by: HauklandJ <hauklandjohannes@gmail.com>
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.



Description
Bug: When signing on behlaf of an org as a user delegated signee, you would retain the SignAction in the "sign" mode, rather than the "NoActionRequired" mode, because the component would only match you with a non-behalf-of-org signature.
With the proposed changes this would not happen.
You can still sign on behalf of multiple organization if you have a key role in more than one providedSignee org, and sign as user delegated yourself after signing as user delegated on behalf of.
What you can no longer do is sign on behalf of an org and then sign for yourself (if you have a key role in the provided signee org AND role based access to sign through the XACML)
Related Issue(s)
Verification/QA
kind/*andbackport*label to this PR for proper release notes grouping