diff --git a/website/docs/political-cp.md b/website/docs/political-cp.md
index 61dff73e..5eef9a5a 100644
--- a/website/docs/political-cp.md
+++ b/website/docs/political-cp.md
@@ -18,3 +18,10 @@ the same read-only public government projection as the public directory.
Outer/inner route and height messages verify both frame source and exact origin.
Routes are restricted to the fixed political page catalogue; heights are bounded.
The responsive sidebar and nested service frames resize into the outer page.
+
+Person profiles show current political offices, scope, term dates and the
+matching existing seal. Both the dedicated profile section and recognition
+gallery use the same current-term projection as Government. Expired, future,
+conflicting and disabled-identity terms cannot produce a current office. A
+register outage is reported as unavailable. Recognition ranks and forum caches
+do not establish the current public mandate; profile access rules are unchanged.
diff --git a/website/node/member-political-offices.mjs b/website/node/member-political-offices.mjs
new file mode 100644
index 00000000..a1a59ef2
--- /dev/null
+++ b/website/node/member-political-offices.mjs
@@ -0,0 +1,11 @@
+import {readGovernmentOffices} from './public-government.mjs';
+// Display only the same unambiguous, active elected terms as Government.
+// Recognition ranks and expiring forum caches cannot establish current office.
+export async function memberPoliticalOffices(db,target,{clock=Date.now}={}){
+ const observedAt=clock();
+ try{
+ const offices=await readGovernmentOffices(db,observedAt),username=target.username.toLowerCase();
+ const records=offices.filter(office=>office.holder?.username.toLowerCase()===username).map(office=>({key:office.key,label:office.name,scope:office.scope,office:office.office,faction:office.faction,seal:'https://www.dunerealms.com/assets/seals/'+office.art,startsAt:office.term.startsAt,expiresAt:office.term.expiresAt}));
+ return {status:'available',records,observedAt};
+ }catch{return {status:'unavailable',records:[],observedAt};}
+}
diff --git a/website/node/member-profiles.mjs b/website/node/member-profiles.mjs
index 4c85e4ff..4d2777e8 100644
--- a/website/node/member-profiles.mjs
+++ b/website/node/member-profiles.mjs
@@ -1,6 +1,7 @@
import {gameStaffSeals,protectedStaffRanks} from './game-staff-seals.mjs';
import {AWARD_LABELS,AWARD_FILES} from './recognition.mjs';
import {politicalSeals} from './political-heraldry.mjs';
+import {memberPoliticalOffices} from './member-political-offices.mjs';
import{readFileSync,existsSync}from'node:fs';
import{createHash}from'node:crypto';
import{identity}from'./auth.mjs';
@@ -67,11 +68,13 @@ export async function memberProfileData(db,target,settings={}){
for(const key of (showcase?Object.keys(departments):departmentsFor(access.nodes,access.ranks,target.username).filter(key=>departmentAwardEarned(stats,key))))add('team-'+key,departments[key]+' Award',base+'award-'+key+'-150.png','Awards');
for(const seal of gameStaffSeals(access.ranks))add(seal.key,seal.label,base+seal.file,'Official');
for(const seal of politicalSeals(access.ranks))add(seal.key,seal.label,base+seal.file,seal.group);
+ const politicalOffices=await memberPoliticalOffices(db,target,{clock:settings.clock||Date.now});
+ for(const office of politicalOffices.records)add('current-office-'+office.key,office.label,office.seal,'Current political offices');
const office=await optional(()=>db.prepare('SELECT roles_json,expires_at FROM drforum_dune_political_roles WHERE website_id=?').bind(target.id).first(),null);
if(office&&Number(office.expires_at)>Date.now()/1000){const known={emperor:'Emperor',house_leader:'Faction leader',specerhuis:'Specerhuis',welvaart:'House of Water',guild_staff:'Vaerkring',landsraad:'Landsraad'};for(const key of JSON.parse(office.roles_json||'[]'))if(known[key])add('office-'+key,known[key],'https://forums.dunerealms.com/assets/seals/office-'+key+'.png','Political offices');}
const memorial=await optional(()=>db.prepare("SELECT m.slug FROM site_memorials m LEFT JOIN site_life_status l ON l.user_id=m.user_id WHERE m.user_id=? AND (l.status IS NULL OR l.status='deceased')").bind(target.id).first(),null);
const clan=await optional(()=>db.prepare('SELECT c.id,c.name,c.tag,c.description,m.clan_role,m.joined_at,(SELECT COUNT(*) FROM site_clan_members n WHERE n.clan_id=c.id) AS member_count FROM site_clan_members m JOIN site_clans c ON c.id=m.clan_id WHERE m.user_id=? AND c.active=1').bind(target.id).first(),undefined);
- return{personnelNumber:await personnelNumberFor(db,target.id),showcase,memorial:memorial?'/memorial/'+memorial.slug:null,personalSeal:namedPersonal?medals.find(m=>m.key==='personal-role'):null,username:target.username,displayName:target.display_name,joinedAt:Number(target.created_at),functions:access.organisation?.assignments||[],avatar:'https://cp.dunerealms.com/api/avatars/face/member/'+encodeURIComponent(target.username),avatarMode:'image',bio:publicProfile.bio,publicInfo:publicProfile.publicInfo,socials:publicProfile.socials,ranks,medals,forum:await publicForumFor(db,target.id),support:{status:staff?(stats?'available':'unavailable'):'not-staff',closed:stats?.totalClosed??null,departments:stats?.departments||{}},quests:{status:'placeholder',completed:null,active:null},clan:clan===undefined?{status:'unavailable'}:clan?{status:'member',emblem:'https://cp.dunerealms.com/api/clan-emblems/'+clan.id,name:clan.name,tag:clan.tag,description:clan.description,role:clan.clan_role,joinedAt:Number(clan.joined_at),members:Math.max(0,Number(clan.member_count))}:{status:'none'}};
+ return{politicalOffices,personnelNumber:await personnelNumberFor(db,target.id),showcase,memorial:memorial?'/memorial/'+memorial.slug:null,personalSeal:namedPersonal?medals.find(m=>m.key==='personal-role'):null,username:target.username,displayName:target.display_name,joinedAt:Number(target.created_at),functions:access.organisation?.assignments||[],avatar:'https://cp.dunerealms.com/api/avatars/face/member/'+encodeURIComponent(target.username),avatarMode:'image',bio:publicProfile.bio,publicInfo:publicProfile.publicInfo,socials:publicProfile.socials,ranks,medals,forum:await publicForumFor(db,target.id),support:{status:staff?(stats?'available':'unavailable'):'not-staff',closed:stats?.totalClosed??null,departments:stats?.departments||{}},quests:{status:'placeholder',completed:null,active:null},clan:clan===undefined?{status:'unavailable'}:clan?{status:'member',emblem:'https://cp.dunerealms.com/api/clan-emblems/'+clan.id,name:clan.name,tag:clan.tag,description:clan.description,role:clan.clan_role,joinedAt:Number(clan.joined_at),members:Math.max(0,Number(clan.member_count))}:{status:'none'}};
}
export function createMemberProfiles(db,settings={}){return async request=>{
const from=request.headers.get('origin');if(from&&from!==origin)return json({message:'Origin rejected.'},403);
diff --git a/website/node/public-government.mjs b/website/node/public-government.mjs
index cb6e22d2..e093e8f2 100644
--- a/website/node/public-government.mjs
+++ b/website/node/public-government.mjs
@@ -19,11 +19,15 @@ export function publicElectionCalendar(now=Date.now()){
return {kind,...window,termWeeks:kind==='house'?2:4};
});
}
+export async function readGovernmentOffices(db,now=Date.now()){
+ const rows=await db.prepare("SELECT t.kind,t.faction,t.office,t.starts_at,t.expires_at,t.outcome,a.username,a.display_name FROM political_office_terms t LEFT JOIN site_accounts a ON a.id=t.user_id AND a.password_hash NOT LIKE '!%' WHERE t.outcome='winner' AND t.starts_at<=? AND t.expires_at>? ORDER BY t.starts_at DESC LIMIT 100").bind(now,now).all();
+ return projectGovernment(rows.results||[],now);
+}
export function createPublicGovernment(db,{clock=Date.now}={}){return async request=>{
if(request.method!=='GET')return Response.json({message:'Read-only public office register.'},{status:405});
if(new URL(request.url).search)return Response.json({message:'No identity overrides are accepted.'},{status:400});
try{
- const now=clock(),rows=await db.prepare("SELECT t.kind,t.faction,t.office,t.starts_at,t.expires_at,t.outcome,a.username,a.display_name FROM political_office_terms t LEFT JOIN site_accounts a ON a.id=t.user_id AND a.password_hash NOT LIKE '!%' WHERE t.outcome='winner' AND t.starts_at<=? AND t.expires_at>? ORDER BY t.starts_at DESC LIMIT 100").bind(now,now).all();
- return Response.json({structure:{landsraad:['emperor','atreides','harkonnen','corrino','ordos'],realms:['atreides','harkonnen','corrino','ordos','fremen'],court:['veiled_concord','spacing_guild'],clanAffiliation:'home_world',companiesBranch:'spacing_guild'},offices:projectGovernment(rows.results||[],now),elections:publicElectionCalendar(now),observedAt:now},{headers:{'Cache-Control':'public,max-age=30'}});
+ const now=clock(),offices=await readGovernmentOffices(db,now);
+ return Response.json({structure:{landsraad:['emperor','atreides','harkonnen','corrino','ordos'],realms:['atreides','harkonnen','corrino','ordos','fremen'],court:['veiled_concord','spacing_guild'],clanAffiliation:'home_world',companiesBranch:'spacing_guild'},offices,elections:publicElectionCalendar(now),observedAt:now},{headers:{'Cache-Control':'public,max-age=30'}});
}catch{return Response.json({message:'The public office register is temporarily unavailable.'},{status:503,headers:{'Cache-Control':'no-store'}});}
};}
diff --git a/website/node/public/passport.css b/website/node/public/passport.css
index e2ab8dc1..1efcb279 100644
--- a/website/node/public/passport.css
+++ b/website/node/public/passport.css
@@ -1,3 +1,4 @@
*{box-sizing:border-box}body{margin:0;background:#0b221b;color:#eee6ce;font:15px/1.7 system-ui,sans-serif}a{color:#e4ca83}.citizen-profile{max-width:1240px;margin:36px auto 60px;padding:0 28px}.citizen-profile [hidden]{display:none!important}.profile-breadcrumb{margin-bottom:22px;font-size:13px;color:#b8c5b7}.profile-breadcrumb a{text-decoration:none}.profile-hero,.profile-panel{border:1px solid #7f8c61;border-radius:16px;padding:30px;margin-bottom:24px;background:linear-gradient(135deg,#1d4031,#102c23);box-shadow:0 8px 25px #0002}.profile-hero{border-top:3px solid #d2b76b;background:linear-gradient(105deg,#173e2bf2,#102e28e8),url('/assets/sietch.webp') center/cover}.citizen-profile .eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:#c4ad6d;margin:0 0 12px}.identity{display:flex;align-items:center;gap:26px;margin:22px 0}.identity>div{min-width:0}#avatar{width:112px;height:112px;flex-shrink:0;border-radius:13px;border:2px solid #c6ab64;object-fit:cover;image-rendering:pixelated;background:#0a241b}.citizen-profile h1,.citizen-profile h2,.citizen-profile h3{font-family:Georgia,serif;color:#efdcab;line-height:1.25;overflow-wrap:anywhere}.citizen-profile h1{font-size:38px;margin:0 0 6px}.citizen-profile h2{font-size:25px;margin:0 0 18px}.citizen-profile h3{font-size:18px}.citizen-profile p{margin-top:0}.muted,#handle,#status{color:#b9ccbd}#handle{margin-bottom:6px}.metadata{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:26px}.metadata>div{border-top:1px solid #8d9a6b55;padding-top:16px}.metadata small{display:block;color:#b5c6b5;font-size:12px;margin-bottom:5px}.metadata strong{overflow-wrap:anywhere}.chips{display:flex;gap:10px;flex-wrap:wrap}.chip{display:inline-block;border:1px solid #a89058;border-radius:20px;padding:5px 13px;background:#9b87481c;font-size:12px;text-decoration:none}.chip[data-staff=true]{border-color:#90b2bb;color:#b8d8e3;background:#456d7b30}.profile-columns{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px}.profile-prose{white-space:pre-line;overflow-wrap:anywhere;color:#d4dfce}.profile-functions{display:grid;gap:12px;margin-bottom:20px}.profile-function{padding:13px 16px;border:1px solid #71856677;border-left:3px solid #d1b66c;border-radius:8px;background:#0b281d}.profile-function strong{display:block;color:#e4cb8e}.profile-function span,.profile-function small{display:block;color:#b8cdbb;font-size:12px}.profile-award-groups{display:grid;gap:28px;margin-top:26px}.profile-awards{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px}.profile-seal{margin:0!important;min-width:0;padding:22px 16px;border:1px solid #7f8b645c;border-radius:12px;background:linear-gradient(145deg,#274936,#102d24);text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px}.profile-seal img{width:128px;height:128px;max-width:100%;object-fit:contain;filter:drop-shadow(0 4px 7px #0005)}.profile-seal figcaption{font-size:13px;color:#e8d6a5;overflow-wrap:anywhere;line-height:1.5;width:100%}.profile-seal small{font-size:11px;color:#b4bd9f}.personal-seal-panel,.profile-order{display:flex;align-items:center;justify-content:space-between;gap:30px}.personal-seal-panel .profile-seal{min-width:210px}.profile-order{justify-content:flex-start;border-color:#c7a955;background:linear-gradient(115deg,#5d502936,#173b2c)}.profile-order>img{object-fit:contain;flex-shrink:0}.profile-community{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}.profile-community>article{padding:20px;border:1px solid #6e886777;border-radius:10px;background:#0c281e}.profile-community strong{display:block;color:#e8d6a5;font-size:21px}.profile-community small{color:#b7cbb8}.profile-community a{font-size:12px}.citizen-profile a:focus-visible{outline:2px solid #e8cb7c;outline-offset:4px}
.profile-clan-emblem{display:block;width:110px;height:110px;object-fit:contain;margin:0 auto 18px;filter:drop-shadow(0 4px 8px #0005)}
+.profile-political-offices{border:3px double #c7a05a;background:linear-gradient(120deg,#4b252c,#261e22);box-shadow:inset 0 0 0 3px #d5ad6114}.profile-political-office-list{display:grid;gap:16px}.profile-political-office{display:flex;align-items:center;gap:24px;padding:20px;border:1px solid #b8975688;border-radius:10px;background:#f6eddd0a;min-width:0}.profile-political-office>img{width:96px;height:96px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 4px 8px #0005)}.profile-political-office small{color:#d4ba82;letter-spacing:.08em;text-transform:uppercase}.profile-political-office h3{margin:7px 0 10px}.profile-political-office strong{color:#edd7a0;font-size:13px}.profile-political-office p{margin:8px 0 0;font-size:12px}@media(max-width:520px){.profile-political-office{align-items:flex-start;flex-direction:column;gap:14px;padding:16px}.profile-political-office>img{width:80px;height:80px}}
diff --git a/website/node/public/passport.html b/website/node/public/passport.html
index 9e8f8a81..ed5edeb9 100644
--- a/website/node/public/passport.html
+++ b/website/node/public/passport.html
@@ -3,6 +3,7 @@
DUNEREALMS · CITIZEN REGISTER Loading the member record…Citizen profile
THE PERSON BEHIND THE NAME
No public biography added yet.
CURRENT RESPONSIBILITIES
CURRENT PUBLIC MANDATE
PERSONAL RECOGNITION
Issued in this member’s name.

SERVICE BEYOND OFFICE
Order membership recognises service to DuneRealms and is separate from staff authority.
SERVICE & RECOGNITION
Current function seals and recorded community achievements.