@dotrino/identity 0.65.0 → 0.65.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vault/acta.js +7 -3
package/package.json
CHANGED
package/vault/acta.js
CHANGED
|
@@ -568,10 +568,14 @@ export function effectiveCaps (acta, pub, extraRenounces = []) {
|
|
|
568
568
|
*/
|
|
569
569
|
export function memberCanSign (acta, pub, ns = null) {
|
|
570
570
|
if (!memberCan(acta, pub, 'sign')) return false
|
|
571
|
-
if (ns == null) return true
|
|
572
571
|
const m = (acta?.members || []).find((x) => x.pub === pub)
|
|
573
|
-
//
|
|
574
|
-
|
|
572
|
+
// SIN `cn` = un aparato TUYO: firma como tú, y no hay nada que preguntarle a nadie.
|
|
573
|
+
if (!m?.cn) return true
|
|
574
|
+
// CON `cn` = un servicio, y el cajón lo dice EL ACTA. Así que no hace falta —ni vale—
|
|
575
|
+
// preguntarle al contenido de qué es: quien pregunta sin decir cajón está pidiendo
|
|
576
|
+
// «firma por la identidad, en general», y eso un servicio no lo hace. Solo se le
|
|
577
|
+
// reconoce la firma dentro del suyo.
|
|
578
|
+
return ns != null && m.cn === ns
|
|
575
579
|
}
|
|
576
580
|
|
|
577
581
|
export function memberCanReadSecrets (acta, pub, ns) {
|