Guides

Sign-in gating and workspace access tests

Use this page to test sign-in gating, workspace and role checks, redirects, and installable-app entry points in a test college workspace. Each case states the setup, the steps, and the expected result for allowed, denied, expired, and unauthenticated use. Record each result with date in college local time, the correlation ID where shown, and the test recipient role.

How to run these tests

Run each case in a test college workspace with test recipients. Confirm the college name at the top of the app before any step. If the name is wrong, stop and switch workspace. Test and staff preview sessions are labeled as test and are excluded from counts. An app failure is not a not-known answer, and an unavailable check stays separate from not answered.

  • Setup: one test college workspace, one published assistant, one approved source, and test accounts for student, instructor or faculty, builder or source owner, approver, and college administrator where the case names a role
  • Unauthenticated setup: a private browser window with no MAJIC account signed in and no cookies from a signed-in session
  • Expired setup: a signed-in session that is allowed to expire in the test workspace, or a session ended screen reached by signing out and then using a saved app link
  • Evidence for each case: pass or fail, date in college local time, role used, college name confirmed, and correlation ID copied where the screen shows one
  • Do not add student record details, passwords, tokens, or keys to any test note, and do not test with a live student record

MAJIC sign-in gating

Sign-in is with a MAJIC account for the college company that owns the workspace. A visitor without an account can use the website widget for public approved sources only. The cases below state what an unauthenticated, expired, denied, and allowed person sees.

Sign-in gating cases, with setup, steps, and expected result
CaseSetup and stepsExpected result
SG-01 Unauthenticated entry to the signed-in appOpen a private window with no account signed in. Open /app/ directly, then open a signed-in screen such as Ask from a guide link.The app does not show a workspace list, a saved answer, or a question record. The screen states that sign-in is required, offers Sign in as the primary action, and shows a correlation ID. No workspace data from another college is shown.
SG-02 Unauthenticated entry to the website widgetIn the same private window, open the widget on a college page. Ask a public question, then ask a personal question.The public question is answered from public approved sources only, with source title, source link, and last checked date. The personal question routes to sign-in or to the named handoff office, with name, phone, email, hours, and location from the office directory. No student record is shown in public.
SG-03 Allowed signed-in entrySign in with a MAJIC account for the test college company. Choose the test college workspace and confirm the college name at the top of the app.Today shows work for that college only. The screens the assigned role covers are shown. A screen the role does not cover is not shown as a working button, and the role that can do the step is named with a link to the relevant guide.
SG-04 Expired session while a draft is typedSign in, open Ask, type a question, and let the session expire or sign out in another tab. Return to the Ask tab and choose the primary action.A 401 session ended screen shows, with the title Your session ended, the screen name in plain words, a correlation ID, and Sign in again and continue as the primary action. Typed text is kept for the same college workspace only. No queued question is auto-sent after sign-in.
SG-05 Expired session followed by successful sign-inFrom SG-04, choose Sign in again and continue, sign in to the same test college, and review the restored screen before sending anything.The app returns to the preserved same-origin destination, restores the assistant, channel, and date range filters and the typed text in its field, moves focus to the page heading, and shows one status line stating the return. Nothing is auto-sent. In session-only mode the screen states that nothing is kept after the session ends instead of claiming a draft was saved.
SG-06 Failed sign-in does not loopFrom the session ended screen, attempt sign-in with a failed sign-in result in the test workspace, then observe the next screen.The failure screen shows again with a new correlation ID. The app does not bounce between sign-in and the app in a loop, and no workspace data is shown.
SG-07 Denied role for a step in the same collegeSign in as a student in the test college. Open a step that needs an approver, such as approving a source, and a step that needs the separate detail permission, such as viewing full question text for other people.A 403 screen shows for each step. The screen names the role that can do the step, links to the relevant guide, shows a correlation ID, and shows no Try again button. Typed text, selected assistant, and filters are kept. No other college data is shown.
SG-08 Role change takes effect on the next requestAs a college administrator, remove or change the test role for a test account, then have that account reopen a saved link to the step from before the change.The next request is checked on the server. The saved link does not reopen the step when the role no longer covers it. The 403 screen names the role that can do the step.

Workspace checks

One college workspace holds one college. Every assistant, source, question, answer, and report belongs to exactly one college workspace. System view shows totals grouped by college only and never mixes question text across colleges.

Workspace cases, with setup, steps, and expected result
CaseSetup and stepsExpected result
WS-01 Correct workspace shownSign in to the test college, choose the test college workspace, and open Today, Sources, Assistants, and Reports.Each list shows work for that college only, with college, assistant, channel, and date range stated where those filters apply. Counts show numerator and denominator counts beside each rate.
WS-02 Wrong college name at the topSign in and choose a workspace whose college name does not match the test college. Try to add a source or ask a question before switching.The test stops at the stop check. The person switches workspace before adding anything. No work is added in the wrong college workspace.
WS-03 No workspace for the collegeSign in with a test account whose college has no workspace shown, as a workspace owner and as an invited member.As owner, the person stops and requests a demo, writing the exact college name in the message field. There is no create workspace step in the app. As invited member, the person stops, does not request a demo, and contacts the college administrator who invited them. No work is added in another college workspace.
WS-04 Cross-college saved linkFrom a signed-in session in College A, copy a link to a question, source, or report in College A. Sign in to College B and open that link.The record from College A does not open in College B. The screen does not show College A question text, and system view shows counts by college only.
WS-05 Workspace load failureIn the test workspace, load the app with a fault that prevents the workspace from loading, then choose Retry load workspace.The failure screen states that the college workspace could not be loaded, states a college name only when it was confirmed before the load, shows a correlation ID, and offers Retry load workspace. No invented college name and no empty list presented as zero work is shown. If the retry returns 401, the screen changes to the session ended case in SG-04.
WS-06 Self-approval is deniedAs the person who submitted a source or built an assistant in the test college, open the approval step for that same submission.The approval step is not available to the submitter. An approver who did not submit or build the work can approve or return it with a note, and the approval record shows reviewer name, decision, note, and date.
WS-07 Test session is excludedFrom a test or staff preview session in the test college, ask a question, save an answer, and open Reports.Test conversations are labeled as test, show no saved item in a personal list, and add nothing to usage, satisfaction, follow, or endorsement counts. Reports label test sessions as excluded.

Redirects and preserved destinations

A preserved destination is a same-origin app path with safe filter keys only. It never holds a token, password, full question text, or report detail. A destination with an external address, a token, or question text is rejected.

Redirect cases, with setup, steps, and expected result
CaseSetup and stepsExpected result
RD-01 Deep link while signed out, valid destinationIn a private window, open a same-origin app destination for a guide or app screen, then choose Sign in again and continue and sign in to the same college.After sign-in, the app returns to that destination, names the screen in plain words, restores filters and typed text, and states the return in one status line. Nothing is auto-sent.
RD-02 Deep link with an external address or a tokenOpen a destination that contains an external address, a token, or full question text in the path or query, then sign in.The destination is rejected and never used. The app offers Today as the way back, with an explanation and a correlation ID. No external page is opened from the preserved destination.
RD-03 Destination that no longer exists or is no longer coveredSave a valid destination, then remove the route or remove the covering role for the test account, and return through sign-in.The failure screen for that destination shows with its own correlation ID and offers Today. The app does not land silently on a home screen with no explanation.
RD-04 College changes after sign-inSave a destination in College A, sign out, sign in to College B, and continue to the saved destination.The preserved destination and the draft for College A are discarded, the screen states that the draft was cleared, and no question text is carried across colleges.
RD-05 Unknown routeWhile signed in, open a route that is not in the app, then choose the primary action on the failure screen.The screen states that the page is not in the app, names Today as the way back, and shows a correlation ID. No blank screen is shown and focus moves to the failure heading.
RD-06 5xx, timeout, or offline on saveIn the test workspace, type a question and save an answer while the step fails with 5xx, a timeout, or offline. Choose Try again without changing the entries.The screen states truthfully whether the save was confirmed or not saved yet, shows a correlation ID for the failed attempt, and keeps all entered text, selected assistant, collection, and filters. Try again keeps the same request, the button is disabled while a retry is in progress, and no second saved item is created. A new failed attempt shows a new correlation ID. No automatic retry loop runs in the background.
RD-07 Guide progress and share fragments are not destinationsOpen a guide with a progress fragment, a share fragment, or a search fragment in the page address, then sign in and return.The fragment is treated as in-page state or a tool payload, not as a server destination. No fragment value is sent to a server as a workspace, token, or question record, and the return goes to the same-origin app screen named in plain words.

Installable-app entry points

The app is installable from the browser on the signed-in app entry. An install does not create an account, a workspace, a role, or a published assistant, and it does not change who may sign in or who may view full questions.

Installable-app entry cases, with setup, steps, and expected result
CaseSetup and stepsExpected result
IN-01 App entry while signed outIn a private window, open the installed app entry or /app/ directly, then confirm the college name step.The sign-in gating in SG-01 applies. No workspace list, saved answer, or question record is shown before sign-in, and the college name is confirmed only after sign-in.
IN-02 App entry while signed inSign in to the test college, open the installed app entry, and open Ask, My Answers, Sources, and Reports in turn.Each entry lands in the test college workspace, with the college name at the top matching the test college. Screens the assigned role does not cover are not shown as working buttons.
IN-03 Install offer does not grant accessOn a device where the install offer is shown, install the app while signed out, then open the installed entry and try to open Ask.Installation alone grants no account, workspace, role, or permission. Sign-in gating in SG-01 and role checks in SG-07 apply on the first open.
IN-04 Manifest and icons load on the public entryOn the public home page and on /app/, load the page and check the manifest link, icon link, and theme color, then reload the page.The manifest, icon, and theme color are present on both entries. Public pages show no dependency, version, address, secret, or error detail. Reloading keeps the same page address and does not create a workspace record.
IN-05 Public live check stays unauthenticatedWith no account signed in, run the live check on the status page, then run the unauthenticated readiness probe described in the smoke script below.The live check at /api/health returns live with only ok, status, service, and checked_at read on the page. The unauthenticated readiness probe at /api/ready returns 404 with no readiness detail. No version, uptime, dependency status, address, configuration, secret, or error text is shown on a public page. Readiness is run only inside the signed-in app and shows ready or not ready per dependency by name only.
IN-06 Offline or failed load on the installed entryOpen the installed entry while offline or with the app load failing, then restore the connection and choose the primary action.The failure screen in RD-06 applies. Entered text, selected assistant, collection, and filters are kept in the same college workspace only, a correlation ID is shown, and Try again keeps the same request with no second saved item.
IN-07 Widget entry stays public-onlyFrom the installed app entry, open the widget as a visitor without an account, ask a public question and a personal question, and check the handoff office.Public approved sources only are used for the public question. The personal question routes to sign-in or to the named handoff office. No signed-in list, saved answer, or workspace record is shown in the widget.

Unauthenticated smoke script

Run this script from a terminal on the test origin to check the unauthenticated probes. It sends no sign-in, no cookies, and no secret. It checks only status codes that a public page may check. Replace the origin with the staging origin for the test run and record the origin, date, and each result.

const base = process.env.CAMPUS_BASE || 'https://campus.appmajic.ai';
const checks = [
  ['GET /api/health', 200],
  ['GET /api/ready', 404],
  ['GET /health', 404],
  ['GET /ready', 404],
  ['GET /readyz', 404],
  ['GET /live', 404],
  ['GET /healthz', 404]
];
for (const item of checks) {
  const method = item[0].split(' ')[0];
  const path = item[0].split(' ')[1];
  const expected = item[1];
  const res = await fetch(base + path, { method, credentials: 'omit', cache: 'no-store', headers: { Accept: 'application/json' } });
  const body = await res.text();
  const ok = res.status === expected;
  console.log(item[0], res.status, ok ? 'Pass' : 'Needs work');
  if (path === '/api/health' && res.status === 200) {
    const data = JSON.parse(body);
    const live = data.ok === true && data.status === 'live' && data.service === 'campus';
    console.log('live fields', live ? 'Pass' : 'Needs work');
  }
}

A 404 on an alias path or on the unauthenticated readiness probe means that path is not offered for that purpose. It is not a ready result and it is not a live result. A signed-in page that requires sign-in for the live path would give a false result to a monitor, so /api/health must stay reachable without sign-in.

Checks before you rely on a gating change

Run each check in the test college workspace. If a check fails, fix it before a live ask or a publish.

  • SG-01 to SG-08 pass for unauthenticated, allowed, expired, and denied use, with correlation IDs recorded where shown
  • WS-01 to WS-07 pass for correct workspace, wrong college, no workspace, cross-college links, load failure, self-approval, and test sessions
  • RD-01 to RD-07 pass for valid and invalid preserved destinations, college change, unknown route, 5xx or offline retry, and guide fragments
  • IN-01 to IN-07 pass for signed-out and signed-in installed entry, install without access, manifest and icons, public live check, offline load, and widget public-only rules
  • The smoke script shows Pass for /api/health and 404 with no readiness detail for /api/ready and each alias path on the staging origin
  • Keyboard, screen reader, and phone checks pass on each failure screen, with focus visible, controls at least 44 pixels high, the failure announced once, and the heading and filters still visible

Follow Sign-in, session, and workspace recovery for failure screen wording, Get started for the first run, Role first-run checklists for role steps, Set retention and access for session-only mode and detail permission, and Read reports for counts by college and assistant.

Next guide

Test the answer itself before you publish, with the source check and the not-known path.