feat(cyod): iOS signing certificates for org and project - #1715
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying irenestaging with
|
| Latest commit: |
6fdbd41
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://33170574.irenestaging.pages.dev |
| Branch Preview URL: | https://cyod-04-signing-certificates.irenestaging.pages.dev |
a6784c9 to
61c4741
Compare
e640618 to
10e89c6
Compare
10e89c6 to
3dc161f
Compare
61c4741 to
3cfd1c3
Compare
3dc161f to
85bbaf6
Compare
3cfd1c3 to
b79eaf6
Compare
9128576 to
0f9e607
Compare
8f39193 to
ae2103b
Compare
ae2103b to
a7fdd76
Compare
115f196 to
77765a7
Compare
a7fdd76 to
f0e5563
Compare
77765a7 to
3c06946
Compare
f0e5563 to
0fe819e
Compare
fix(cyod): review fixes for the account settings CYOD page - ak-svg/toggle-automated-dast: accept ...attributes. This page renders it with a data-test attribute that was silently dropped, so the disabled-state test failed on this branch and only passed once a later PR added the splat. - cyod-settings: point the owner at Organization Settings to enable CYOD instead of telling them to contact an owner, and give the inner stack a full width so the panel's sections stop being sized by their own content. - device-table: put the loading state in a bordered box with the loader and label centred, so the table area keeps its footprint while loading. - Drop the unused cyod-devices-empty and cyod-turn-on SVG components. - Add the CYOD settings route to the Account Settings sidenav currentWhen. - Replace the hand-built test doubles with mirage: new registered-device model and factory, role traits on organization-me, CYOD traits on organization, and a registered-devices route.
fix(cyod): hide activate for expired certs, surface field errors
The activate button no longer renders for an expired certificate. mycroft
now answers 400 for that (cannot activate an expired certificate), so
offering the button only produced a guaranteed error.
Removed rather than disabled, on two counts: the row already carries an
Expired chip in error colour, so the absence is explained on screen; and the
template already removes rather than disables for the analogous case -- an
already-active cert has no button either. One condition, same shape as the
one beside it.
parse-error: read DRF field-keyed error bodies. Validation failures on the
signing-certificate upload now come back as {'p12': ['file too large...']}
rather than {'detail': ...}, because the validation moved into the
serializer. Without this the user saw the generic 'please try again' and
lost the reason.
The new branch is appended last in the existing if/else chain, so detail,
message, title and the 500/0 statuses all short-circuit before it -- none of
the ~160 existing call sites change behaviour. It only reads values that are
arrays of strings, which is the shape DRF produces for field errors, so a
stray string field in an error body is not mistaken for the message.
There was no test for parse-error at all; there are 7 now, covering the new
shape and pinning the existing ones. 16 component tests pass, including the
new expired-cert case.
fix(cyod): review fixes for the iOS signing certificates
- Limit the project-scope panel to org admins and owners. The org-scope panel
is owner-only, so without this the project-scope override let any member
upload a .p12 and password, read enrolled UDIDs, and delete the certificate.
- Allow deleting a lone active certificate. Exactly one certificate is always
active, so gating on is_active alone locked a single-certificate org out of
ever removing it; the backend only refuses while siblings exist.
- Fix the provisioning-profile picker, which rendered a button rather than a
label and so never opened its hidden file input.
- Mark the p12 password mandatory, with a primary-colour asterisk, the required
attribute, and Save gated on it.
- Move the field labels out of AkTextField's @Label so they match the drawer's
other labels, keeping the accessible name via aria-label.
- Put the "no certificates" empty state in a bordered box.
- Drop the delete-confirmation reason field and put the actions directly under
the question rather than pinned to the drawer footer. The delete now sends no
body, so the reason state, request options, styles and placeholder copy go
with it.
- Rework the tests onto mirage, replacing the ajax service stubs.
- Format parse-error-test.js, which was failing the lint job.
3c06946 to
fb50fb3
Compare
0fe819e to
6fdbd41
Compare
|



4/7 in the CYOD stack. Bases on #1714 (cyod-03-org-registration-toggle). Merge in order 01→07.
Org- and project-level iOS signing certificates: the add-certificate drawer, the existing-certificates tab, and delete confirmation. Also wires both this and 03's toggle into the organization settings page.
Design review applied:
py-2 px-4drawer body, dark dividers, tip callout at 4px radius on a 4px accent bar, medium input labels, italic "No file chosen", selected files as removable chips, and the certificate card ramp from the Figma frames (name 700, meta labels 12px/500, values 12px/600).cc @Yibaebi — the delete dialog and the card ramp are the two worth a close look.