1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width,initial-scale=1 ">
6
+ < title > @node-red/editor-api_auth - Documentation</ title >
7
+
8
+ < script src ="scripts/prettify/prettify.js "> </ script >
9
+ < script src ="scripts/prettify/lang-css.js "> </ script >
10
+ < script src ="scripts/jquery-3.3.1.min.js "> </ script >
11
+ < link type ="text/css " rel ="stylesheet " href ="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css ">
12
+ < link type ="text/css " rel ="stylesheet " href ="styles/prettify-tomorrow.css ">
13
+ < link type ="text/css " rel ="stylesheet " href ="styles/jsdoc-default.css ">
14
+ < link href ="https://nodered.org/css/simplegrid.css " rel ="stylesheet " media ="screen ">
15
+ < link href ="https://nodered.org/css/style.css " rel ="stylesheet " media ="screen ">
16
+ < link href ="https://nodered.org/css/front.css " rel ="stylesheet " media ="screen ">
17
+ < link href ="https://nodered.org/css/docs.css " rel ="stylesheet " media ="screen ">
18
+ < link href ="https://nodered.org/css/blog.css " rel ="stylesheet " media ="screen ">
19
+ < link href ="https://nodered.org/css/api.css " rel ="stylesheet " media ="screen ">
20
+ < style >
21
+ .nav-item { font-size : 0.9em ; display : none }
22
+ td : first-child span {
23
+ font-family : 'Open Sans' , sans-serif;
24
+ font-size : 0.9em ;
25
+ background : none;
26
+ border : none;
27
+ width : auto;
28
+ text-align : left;
29
+ display : inline-block;
30
+ margin-right : 10px ;
31
+ }
32
+ </ style >
33
+ </ head >
34
+ < body >
35
+
36
+ < div class ="header ">
37
+ < div class ="header-content ">
38
+ < div class ="brand "> < a href ="/ "> Node-RED</ a > </ div >
39
+ < ul class ="navigation ">
40
+ < li {% if page.url == "/ " %}class ="current "{% endif %} > < a href ="/ "> home</ a > </ li >
41
+ < li {% if page.url contains '/about/' %}class="current "{% endif %} > < a href ="/about/ "> about</ a > </ li >
42
+ < li {% if page.url contains '/blog/' %}class="current "{% endif %} > < a href ="/blog/ "> blog</ a > </ li >
43
+ < li {% if page.url contains '/docs/' %}class="current "{% endif %} > < a href ="/docs/ "> documentation</ a > </ li >
44
+ < li > < a href ="https://discourse.nodered.org/ "> forum</ a > </ li >
45
+ < li > < a href ="https://flows.nodered.org/ "> flows</ a > </ li >
46
+ < li > < a href ="https://github.com/node-red "> github</ a > </ li >
47
+ </ ul >
48
+ < a href ="# " class ="menu "> < i class ="fa fa-reorder fa-2x "> </ i > </ a >
49
+ </ div >
50
+ </ div >
51
+
52
+ < input type ="checkbox " id ="nav-trigger " class ="nav-trigger " />
53
+ < label for ="nav-trigger " class ="navicon-button x ">
54
+ < div class ="navicon "> </ div >
55
+ </ label >
56
+
57
+ < label for ="nav-trigger " class ="overlay "> </ label >
58
+
59
+
60
+ < div class ="docs ">
61
+ < div class ="grid ">
62
+ < div class ="col-3-12 ">
63
+ < ul class ="toc ">
64
+ < li class ="nav-link nav-home-link "> < a href ="index.html "> Home</ a > </ li > < li class ="tocheader "> < ul > < li class ="toctitle "> < a href ="node-red.html "> node-red</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.auth "> auth</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.events "> events</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.httpAdmin "> httpAdmin</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.httpNode "> httpNode</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.log "> log</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.nodes "> nodes</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.runtime "> runtime</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.server "> server</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.settings "> settings</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.util "> util</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.init "> init(...)</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.start "> start(...)</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.stop "> stop(...)</ a > </ li > < li class ="nav-item "> < a href ="node-red.html#.version "> version(...)</ a > </ li > < li class ="toctitle "> < a href ="@node-red_editor-api.html "> @node-red/editor-api</ a > </ li > < li class ="nav-item "> < a href ="@node-red_editor-api.html#.auth "> auth</ a > </ li > < li class ="nav-item "> < a href ="@node-red_editor-api.html#.httpAdmin "> httpAdmin</ a > </ li > < li class ="nav-item "> < a href ="@node-red_editor-api.html#.init "> init(...)</ a > </ li > < li class ="nav-item "> < a href ="@node-red_editor-api.html#.start "> start(...)</ a > </ li > < li class ="nav-item "> < a href ="@node-red_editor-api.html#.stop "> stop(...)</ a > </ li > < li class ="toctitle "> < a href ="@node-red_runtime.html "> @node-red/runtime</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.comms "> comms</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.context "> context</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.flows "> flows</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.library "> library</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.nodes "> nodes</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.projects "> projects</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.settings "> settings</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.init "> init(...)</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.isStarted "> isStarted(...)</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.start "> start(...)</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.stop "> stop(...)</ a > </ li > < li class ="nav-item "> < a href ="@node-red_runtime.html#.version "> version(...)</ a > </ li > < li class ="toctitle "> < a href ="@node-red_util.html "> @node-red/util</ a > </ li > < li class ="nav-item "> < a href ="@node-red_util.html#.i18n "> i18n</ a > </ li > < li class ="nav-item "> < a href ="@node-red_util.html#.log "> log</ a > </ li > < li class ="nav-item "> < a href ="@node-red_util.html#.util "> util</ a > </ li > < li class ="nav-item "> < a href ="@node-red_util.html#.init "> init(...)</ a > </ li > </ ul > </ li > < li class =""> < a href ="global.html "> Globals</ a > </ li >
65
+ </ ul >
66
+ </ div >
67
+ < div class ="col-9-12 ">
68
+ < div class ="docs-content ">
69
+ <!--
70
+ <h1 class="docs-title">@node-red/editor-api_auth</h1>
71
+ -->
72
+
73
+
74
+
75
+
76
+
77
+
78
+ < section >
79
+
80
+ < header >
81
+ < h2 > @node-red/editor-api.auth
82
+ </ h2 >
83
+
84
+ </ header >
85
+
86
+ < article >
87
+ < div class ="container-overview " style ="padding-bottom: 40px; border-bottom: 1px solid #ccc; ">
88
+
89
+
90
+
91
+
92
+
93
+
94
+ < dl class ="details ">
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <!-- -->
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ </ dl >
128
+
129
+
130
+
131
+
132
+ </ div >
133
+
134
+
135
+ < div class ="widget " style ="padding-bottom: 40px; border-bottom: 1px solid #eee; ">
136
+ < div class ="col-6-12 ">
137
+
138
+ < h4 > Functions</ h4 >
139
+ < table >
140
+ < tbody >
141
+
142
+ < tr > < td > < a href ="@node-red_editor-api_auth.html#.needsPermission "> needsPermission < span class ="type-signature "> ( permission )</ span > </ a > </ td > </ tr >
143
+
144
+ </ tbody >
145
+ </ table >
146
+
147
+ </ div >
148
+ < div class ="col-6-12 ">
149
+
150
+ </ div >
151
+ < br style ="clear:both " />
152
+ </ div >
153
+
154
+
155
+
156
+
157
+
158
+
159
+ < div class ="section-method ">
160
+
161
+
162
+
163
+ < h4 class ="name " id =".needsPermission "> needsPermission< span class ="signature "> (permission)</ span > < span class ="type-signature "> → {function}</ span > </ h4 >
164
+
165
+
166
+
167
+
168
+
169
+ < div class ="description ">
170
+ < p > Returns an Express middleware function that ensures the user making a request
171
+ has the necessary permission.</ p >
172
+ </ div >
173
+
174
+
175
+
176
+
177
+
178
+ < dl class ="details ">
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <!-- -->
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ </ dl >
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ < h5 > Parameters:</ h5 >
222
+
223
+
224
+ < table class ="params ">
225
+ < thead >
226
+ < tr >
227
+
228
+ < th > Name</ th >
229
+
230
+
231
+ < th > Type</ th >
232
+
233
+
234
+
235
+
236
+
237
+ < th class ="last "> Description</ th >
238
+ </ tr >
239
+ </ thead >
240
+
241
+ < tbody >
242
+
243
+
244
+ < tr >
245
+
246
+ < td class ="name "> < code > permission</ code > </ td >
247
+
248
+
249
+ < td class ="type ">
250
+
251
+
252
+ < span class ="param-type "> < code > String</ code > </ span >
253
+
254
+
255
+
256
+ </ td >
257
+
258
+
259
+
260
+
261
+
262
+ < td class ="description last ">
263
+ < p > the permission required for the request, such as < code > flows.write</ code > </ p >
264
+
265
+ </ td >
266
+ </ tr >
267
+
268
+
269
+ </ tbody >
270
+ </ table >
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+ < div class ="section-returns ">
286
+ < h5 > Returns:</ h5 >
287
+
288
+
289
+
290
+ < dl class ="param-type ">
291
+ < dt >
292
+ Type:
293
+ </ dt >
294
+ < dd >
295
+
296
+ < span class ="param-type "> < code > function</ code > </ span >
297
+
298
+
299
+ </ dd >
300
+ </ dl >
301
+
302
+
303
+ < div class ="param-desc ">
304
+ < ul >
305
+ < li > an Express middleware</ li >
306
+ </ ul >
307
+ </ div >
308
+
309
+
310
+ </ div >
311
+
312
+
313
+
314
+ </ div >
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ </ article >
323
+
324
+ </ section >
325
+
326
+
327
+
328
+
329
+ </ div >
330
+ </ div >
331
+ </ div >
332
+ </ div >
333
+
334
+ < div class ="links ">
335
+ < div class ="grid ">
336
+ < div class ="col-1-3 ">
337
+ < p > < a href ="https://nodered.org "> Node-RED</ a > is a visual wiring tool for the Internet of Things.</ p >
338
+ < p > A project of the < a href ="https://js.foundation/ "> JS Foundation</ a > .</ p >
339
+ </ div >
340
+ < div class ="col-1-6 ">
341
+ < ul >
342
+ < li > < a href ="https://github.com/node-red "> GitHub</ a > </ li >
343
+ < li > < a href ="https://www.npmjs.com/package/node-red "> npm</ a > </ li >
344
+ < li > < a href ="/docs "> Documentation</ a > </ li >
345
+ < li > < a href ="/docs/api "> APIs</ a > </ li >
346
+ </ ul >
347
+ </ div >
348
+ < div class ="col-1-6 ">
349
+ < ul >
350
+ < li > < a href ="https://flows.nodered.org "> Flow Library</ a > </ li >
351
+ < li > < a href ="/about/ "> About</ a > </ li >
352
+ < li > < a href ="/about/conduct "> Code of Conduct</ a > </ li >
353
+ < li > < a href ="/about/community "> Community</ a > </ li >
354
+ </ ul >
355
+ </ div >
356
+ < div class ="col-1-6 ">
357
+ < ul >
358
+ < li > < a href ="/blog "> Blog</ a > </ li >
359
+ < li > < a href ="https://twitter.com/nodered "> Twitter</ a > </ li >
360
+ < li > < a href ="https://discourse.nodered.org "> Forum</ a > </ li >
361
+ < li > < a href ="/slack "> Slack</ a > </ li >
362
+ </ ul >
363
+ </ div >
364
+
365
+
366
+ </ div >
367
+ </ div >
368
+
369
+
370
+ < script >
371
+ var file = window . location . pathname . split ( "/" ) . pop ( ) ;
372
+ $ ( ".toctitle > a[href='" + file + "']" ) . parent ( ) . addClass ( 'active' ) ;
373
+ $ ( ".nav-item > a[href^='" + file + "']" ) . parent ( ) . show ( ) ;
374
+ prettyPrint ( ) ;
375
+ </ script >
376
+ < script src ="scripts/linenumber.js "> </ script >
377
+ </ body >
378
+ </ html >
0 commit comments