<!--
This control is used to change your own active rights.
Basically the same thing happens as with grant/revoke,
except that there's not second person, but instead the
"potentialities" slot is changed.
-->
<dsssl:when xmlns:dsssl="http://www.askemos.org/2000/NameSpaceDSSSL" xmlns:mind="http://www.askemos.org/2000/CoreAPI" test="(equal? (data (form-field "action" (current-node))) "adjust-capabilities") ">
<mind:reply>
<dsssl:copy-of select="#CONTENT">
(let ((desired (map (lambda (n) (string->right (data n)))
(form-field 'c (current-node))))
(to (make element gi: 'to (literal (oid->string (me 'get 'id)))))
(from (make element gi: 'from (literal (oid->string (me 'get 'id))))))
(node-list
(document-element (grove-root (current-node))) ; body unchanged
(map
(lambda (right)
(make element gi: 'grant ns: 'mind to (right->node-list right)))
desired)
(map
(lambda (right)
(make element gi: 'revoke ns: 'mind from (right->node-list right)))
(filter (lambda (c) (not (member c desired))) (me 'capabilities)))))
</dsssl:copy-of>
</mind:reply>
</dsssl:when>
<!--
;;; Local Variables: ***
;;; mode: dsssl ***
;;; End: ***
-->