mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
fix(concord): re-issue a legacy Admin role without role_id on Make admin
An Admin role published before Role content carried role_id is dropped by Armada, along with every Grant naming it, so promoting a member silently did nothing there. Re-define it at the same id before granting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a71bb56b6c
commit
9c2cccd68d
+7
@@ -1126,6 +1126,13 @@ class AccountConcordActions(
|
||||
roleId.toHexKey()
|
||||
}
|
||||
|
||||
// An Admin role published before Amethyst wrote `role_id` into Role content is invisible
|
||||
// to Armada, which then drops this Grant too. Re-issue it at the same id to heal it.
|
||||
if (existing != null && existing.value.roleId.isNullOrEmpty()) {
|
||||
val healWrap = ConcordModeration.defineRole(account.signer, cp, communityId.hexToByteArray(), roleIdHex.hexToByteArray(), existing.value, session.controlEditions(), TimeUtils.now(), owner = session.entry.owner)
|
||||
publishConcordWrap(session.entry, healWrap)
|
||||
}
|
||||
|
||||
// Admin carries every management bit, so this Grant makes its member staff: it must
|
||||
// deliver the control_root alongside the rank (CORD-04 §3), or the new admin holds
|
||||
// authority it cannot publish under.
|
||||
|
||||
Reference in New Issue
Block a user