P2: Linked-account “Acting as …” chip + principal prefs - #27
Merged
Conversation
Show "Acting as [school email]" in portal RightBar/Admin/Settings (and BaseNav tooltip) when school_uid claim or personal+linked_to. Write calendar prefs to active school doc; refresh ID token claims after acceptLink; add acting-as unit tests to CI. Co-authored-by: Sander Vonk <sandervonk@users.noreply.github.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.
Summary
Adds an Acting as [school email] chip for personal/linked sessions, plus a small principal-write fix so calendar prefs land on the school doc.
Changes
Chip / chrome
school_uid_claim,is_acting_as_linked,acting_as_email,acting_as_label(prefer ID-tokenschool_uid; fall back topersonal_account && linked_to; email fromactive_doconly)title/aria-labelacceptLink:refresh_id_token_claims(true)soschool_uidlands before board/stats/surveyapiFetchset_userPrincipal correctness
set_account_pref(and Settings calendar toggles) were writingprefsto the personalaccount_refwhile spreadingactive_doc.prefs— school fields onto the personal uid docderank_notes/hide_finished) read/write viaactive_doc/active_refaccount_doc) as beforefinished[], notes, surveys, enroll,update_remotealready targetedactive_doc— left as-ispersonal_account → is_teacher falseTests / CI
scripts/test-acting-as.mjs+npm run test:acting-as.github/workflows/ci.ymlbeside me-board testsFiles
src/common/actingAs.ts(new)scripts/test-acting-as.mjs(new)src/store/index.tssrc/components/Portal/RightBar.vuesrc/views/Admin/Admin.vuesrc/views/Portal/SettingsModal.vuesrc/components/Home/BaseNav.vuesrc/components/Portal/CalendarBlock.vuepackage.json,.github/workflows/ci.ymlSuccess checks