|
36 | 36 | </div> |
37 | 37 | </script> |
38 | 38 | <script type="text/x-red" data-help-name="api get jwt"> |
39 | | -Request a JWT token for talking with API. Leave config blank to impersonate root |
| 39 | +Request a JWT token for talking with API. Leave config blank to impersonate root. |
40 | 40 | </script> |
41 | 41 | <script type="text/javascript"> |
42 | 42 | RED.nodes.registerType('api get jwt', { |
|
430 | 430 | </div> |
431 | 431 | </script> |
432 | 432 | <script type="text/x-red" data-help-name="grant permission"> |
433 | | - <p>Delete payload as new entity in collection</p> |
| 433 | + <p>Grants a role (or user if set by msg.targetid) a specific permission on the entity/entities in payload.</p> |
434 | 434 | </script> |
435 | 435 | <script type="text/javascript"> |
436 | 436 | RED.nodes.registerType('grant permission', { |
|
508 | 508 | </div> |
509 | 509 | </script> |
510 | 510 | <script type="text/x-red" data-help-name="revoke permission"> |
511 | | - <p>Delete payload as new entity in collection</p> |
| 511 | + <p>Revoke a specific permission for a role (or user if set by msg.targetid) on the entity/entities in payload.</p> |
512 | 512 | </script> |
513 | 513 | <script type="text/javascript"> |
514 | 514 | RED.nodes.registerType('revoke permission', { |
|
563 | 563 |
|
564 | 564 |
|
565 | 565 |
|
566 | | -<script type="text/x-red" data-template-name="grant permission"> |
567 | | - <div class="form-row"> |
568 | | - <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
569 | | - <input type="text" id="node-input-name" placeholder="Name"> |
570 | | - </div> |
571 | | - <div class="form-row"> |
572 | | - <label for="node-input-targetid"><i class="fa fa-tasks"></i> Target</label> |
573 | | - <select id="node-input-targetid-select"> |
574 | | - </select> |
575 | | - <input id="node-input-targetid" type="hidden"> |
576 | | - </div> |
577 | | - <div class="form-row"> |
578 | | - <label for="node-input-typed-entities"><i class="fa fa-list"></i> Entities</label> |
579 | | - <input id="node-input-typed-entities" type="text" style="width: 70%"> |
580 | | - <input id="node-input-entities" type="hidden"> |
581 | | - </div> |
582 | | - <div class="form-row"> |
583 | | - <label><i class="fa fa-tag"></i> Bitsexplained </label> |
584 | | - (F:-1, R:2, U:3, D:4, I:5) |
585 | | - </div> |
586 | | - <div class="form-row"> |
587 | | - <label for="node-input-bits"><i class="fa fa-tag"></i> Bits </label> |
588 | | - <input type="text" id="node-input-bits" placeholder="Bits seperated by comma,"> |
589 | | - </div> |
590 | | -</script> |
591 | | -<script type="text/x-red" data-help-name="grant permission"> |
592 | | - <p>Delete payload as new entity in collection</p> |
593 | | -</script> |
594 | | -<script type="text/javascript"> |
595 | | - RED.nodes.registerType('grant permission', { |
596 | | - category: 'api', |
597 | | - color: "#a6bbcf", |
598 | | - defaults: { |
599 | | - name: { value: "" }, |
600 | | - targetid: { value: "result._id", required: true }, |
601 | | - entities: { value: "payload", required: true }, |
602 | | - bits: { value: "", required: true } |
603 | | - }, |
604 | | - inputs: 1, |
605 | | - outputs: 1, |
606 | | - icon: "bridge.png", |
607 | | - label: function () { |
608 | | - return this.name || "grant permission"; |
609 | | - }, |
610 | | - labelStyle: function () { |
611 | | - return this.name ? "node_label_italic" : ""; |
612 | | - }, |
613 | | - |
614 | | - oneditprepare: function () { |
615 | | - $("#node-input-typed-entities").typedInput({ types: ['msg'] }); |
616 | | - $("#node-input-typed-entities").typedInput('value', this.entities); |
617 | | - |
618 | | - |
619 | | - $.getJSON('api_roles',function(data) { |
620 | | - $.each(data, function(i, ele) { |
621 | | - $('#node-input-targetid-select').append($('<option>', { |
622 | | - value: ele._id, |
623 | | - text : ele.name |
624 | | - })); |
625 | | - }); |
626 | | - $('#node-input-targetid-select').val($('#node-input-targetid').val()); |
627 | | - }); |
628 | | - |
629 | | - }, |
630 | | - oneditsave: function () { |
631 | | - $('#node-input-targetid').val($('#node-input-targetid-select').val()); |
632 | | - $("#node-input-entities").val($("#node-input-typed-entities").typedInput('value')); |
633 | | - } |
634 | | - |
635 | | - }); |
636 | | -</script> |
637 | | - |
638 | | - |
639 | | - |
640 | | - |
641 | 566 |
|
642 | 567 |
|
643 | 568 |
|
|
699 | 624 |
|
700 | 625 | </script> |
701 | 626 | <script type="text/x-red" data-help-name="map reduce"> |
702 | | - <p>Delete payload as new entity in collection</p> |
| 627 | + <p> |
| 628 | + Run a mapreduce on a collection. |
| 629 | + If output is set for inline, the result will be returned in payload, for all else, you can get the result in the receiving collection.<br> |
| 630 | + Finalize is optional, and can be left blank if not needed.<br> |
| 631 | + Be carefull to keep _acl on all reduced objects, so you have permission to read the result.<br> |
| 632 | + <a href="https://docs.mongodb.com/manual/tutorial/map-reduce-examples/index.html">map-reduce-examples</a><br> |
| 633 | +<a href="https://docs.mongodb.com/manual/reference/method/db.collection.mapReduce/#db.collection.mapReduce">dokumentation</a> |
| 634 | + </p> |
703 | 635 | </script> |
704 | 636 | <script type="text/javascript"> |
705 | 637 | RED.nodes.registerType('map reduce', { |
|
0 commit comments