Skip to content

Commit da43209

Browse files
committed
Document existing events
* LoadAdditionalScripts (@rullzer) - nextcloud/server#16641 * LoadViewerEvent (@skjnldsv) - nextcloud/viewer#271 * RegisterDirectEditorEvent (@juliushaertl) - nextcloud/server#17625 * typed events for files scanner (@ChristophWurst) - nextcloud/server#18351 * typed events for group mangement (@ChristophWurst) - nextcloud/server#18350 * AddContentSecurityPolicyEvent (@rullzer) - nextcloud/server#15730 * UserLiveStatusEvent (@georgehrke) - nextcloud/server#21186 * password_policy events (@ChristophWurst) - nextcloud/server#18019 * AddFeaturePolicyEvent (@rullzer) - nextcloud/server#16613 * ShareCreatedEvent (@rullzer) - nextcloud/server#18384 * LoadSettingsScriptsEvent (@blizzz) - nextcloud/server#21475 * flow events (@rullzer) - nextcloud/server#18535 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
1 parent 9e2afd1 commit da43209

File tree

1 file changed

+167
-11
lines changed

1 file changed

+167
-11
lines changed

developer_manual/basics/events.rst

Lines changed: 167 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,40 @@ Available Events
168168
Here you find an overview of the public events that can be consumed in apps. See their source files for more details.
169169

170170
``\OCA\DAV\Events\SabrePluginAuthInitEvent``
171-
********************************************************
171+
********************************************
172172

173173
*Available in Nextcloud 20 and later.*
174174

175175
This event is triggered during the setup of the SabreDAV server to allow the registration of additional authentication backends.
176176

177+
``\OCA\FederatedFileSharing\Events\FederatedShareAddedEvent``
178+
*************************************************************
179+
180+
*Available in Nextcloud 20 and later.*
181+
182+
This event is triggered when a federated share is successfully added.
183+
184+
``\OCA\Files\Event\LoadAdditionalScriptsEvent``
185+
***********************************************
186+
187+
*Available in Nextcloud 17 and later.*
188+
189+
This event is triggered when the files app is rendered. It canb e used to add additional scripts to the files app.
190+
177191
``\OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent``
178192
********************************************************
179193

180194
*Available in Nextcloud 20 and later.*
181195

182196
Emitted before the rendering step of the public share page happens. The event holds a flag that specifies if it is the authentication page of a public share.
183197

198+
``\OCA\Viewer\Event\LoadViewer``
199+
********************************
200+
201+
*Available in Nextcloud 17 and later.*
202+
203+
This event is triggered whenever the viewer is loaded and extensions should be loaded.
204+
184205
``\OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent``
185206
*************************************************************
186207

@@ -202,13 +223,129 @@ Emitted when the authentication fails, but only if the login name can be associa
202223

203224
Event emitted by apps whenever there was an interaction with another user or contact.
204225

226+
It is an event that allows apps to notify other components about an interaction between two users. This can be used to build better recommendations and suggestions in user interfaces.
227+
228+
Emitters should add at least one identifier (uid, email, federated cloud ID) of the recipient of the interaction.
229+
230+
``\OCP\DirectEditing\RegisterDirectEditorEvent``
231+
************************************************
232+
233+
*Available in Nextcloud 18 and later.*
234+
235+
Event to allow to register the direct editor.
236+
237+
``\OCP\Files\Events\BeforeFileScannedEvent``
238+
********************************************
239+
240+
*Available in Nextcloud 18 and later.*
241+
242+
``\OCP\Files\Events\BeforeFolderScannedEvent``
243+
**********************************************
244+
245+
*Available in Nextcloud 18 and later.*
246+
247+
``\OCP\Files\Events\FileCacheUpdated``
248+
**************************************
249+
250+
*Available in Nextcloud 18 and later.*
251+
252+
``\OCP\Files\Events\FileScannedEvent``
253+
**************************************
254+
255+
*Available in Nextcloud 18 and later.*
256+
257+
``\OCP\Files\Events\FolderScannedEvent``
258+
****************************************
259+
260+
*Available in Nextcloud 18 and later.*
261+
262+
``\OCP\Files\Events\NodeAddedToCache``
263+
**************************************
264+
265+
*Available in Nextcloud 18 and later.*
266+
267+
``\OCP\Files\Events\NodeRemovedFromCache``
268+
******************************************
269+
270+
*Available in Nextcloud 18 and later.*
271+
272+
``\OCP\Group\Events\BeforeGroupCreatedEvent``
273+
*********************************************
274+
275+
*Available in Nextcloud 18 and later.*
276+
277+
``\OCP\Group\Events\BeforeGroupDeletedEvent``
278+
*********************************************
279+
280+
*Available in Nextcloud 18 and later.*
281+
282+
``\OCP\Group\Events\BeforeUserAddedEvent``
283+
******************************************
284+
285+
*Available in Nextcloud 18 and later.*
286+
287+
``\OCP\Group\Events\BeforeUserRemovedEvent``
288+
********************************************
289+
290+
*Available in Nextcloud 18 and later.*
291+
292+
``\OCP\Group\Events\GroupCreatedEvent``
293+
***************************************
294+
295+
*Available in Nextcloud 18 and later.*
296+
297+
``\OCP\Group\Events\GroupDeletedEvent``
298+
***************************************
299+
300+
*Available in Nextcloud 18 and later.*
301+
302+
``\OCP\Group\Events\UserAddedEvent``
303+
************************************
304+
305+
*Available in Nextcloud 18 and later.*
306+
307+
``\OCP\Group\Events\UserRemovedEvent``
308+
**************************************
309+
310+
*Available in Nextcloud 18 and later.*
205311
``\OCP\Mail\Events\BeforeMessageSent``
206312
**************************************
207313

208314
*Available in Nextcloud 19 and later.*
209315

210316
Emitted before a system mail is sent. It can be used to alter the message.
211317

318+
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
319+
***************************************************
320+
321+
*Available in Nextcloud 17 and later.*
322+
323+
Allows to inject something into the default content policy. This is for example useful when you're injecting Javascript code into a view belonging to another controller and cannot modify its Content-Security-Policy itself. Note that the adjustment is only applied to applications that use AppFramework controllers.
324+
325+
WARNING: Using this API incorrectly may make the instance more insecure. Do think twice before adding whitelisting resources. Please do also note that it is not possible to use the `disallowXYZ` functions.
326+
327+
``\OCP\Security\Events\GenerateSecurePasswordEvent``
328+
****************************************************
329+
330+
*Available in Nextcloud 18 and later.*
331+
332+
``\OCP\Security\Events\ValidatePasswordPolicyEvent``
333+
****************************************************
334+
335+
*Available in Nextcloud 18 and later.*
336+
337+
``\OCP\Security\FeaturePolicy\AddFeaturePolicyEvent``
338+
****************************************************
339+
340+
*Available in Nextcloud 17 and later.*
341+
342+
Event that allows to register a feature policy header to a request.
343+
344+
``\OCP\Share\Events\ShareCreatedEvent``
345+
*******************************************
346+
347+
*Available in Nextcloud 18 and later.*
348+
212349
``\OCP\Share\Events\VerifyMountPointEvent``
213350
*******************************************
214351

@@ -224,10 +361,10 @@ Emitted before a user is logged in via remember-me cookies.
224361
``\OCP\User\Events\UserLoggedInWithCookieEvent``
225362
************************************************
226363

227-
Emitted when a user has been succesfully logged in via remember-me cookies.
228-
229364
*Available in Nextcloud 18 and later.*
230365

366+
Emitted when a user has been succesfully logged in via remember-me cookies.
367+
231368
``\OCP\User\Events\BeforePasswordUpdatedEvent``
232369
***********************************************
233370

@@ -261,15 +398,11 @@ Emitted when a new user has been created on the back-end.
261398

262399
*Available in Nextcloud 18 and later.*
263400

264-
Emitted before a user is logged out.
265-
266401
``\OCP\User\Events\UserDeletedEvent``
267402
*************************************
268403

269404
*Available in Nextcloud 18 and later.*
270405

271-
Emitted when a user has been logged out successfully.
272-
273406
``\OCP\User\Events\BeforeUserLoggedInEvent``
274407
********************************************
275408

@@ -280,6 +413,8 @@ Emitted when a user has been logged out successfully.
280413

281414
*Available in Nextcloud 18 and later.*
282415

416+
Emitted before a user is logged out.
417+
283418
``\OCP\User\Events\CreateUserEvent``
284419
************************************
285420

@@ -295,6 +430,11 @@ Emitted when a user has been logged out successfully.
295430

296431
*Available in Nextcloud 18 and later.*
297432

433+
``\OCP\User\Events\UserLiveStatusEvent``
434+
****************************************
435+
436+
*Available in Nextcloud 20 and later.*
437+
298438
``\OCP\User\Events\UserLoggedInEvent``
299439
**************************************
300440

@@ -305,13 +445,29 @@ Emitted when a user has been logged out successfully.
305445

306446
*Available in Nextcloud 18 and later.*
307447

308-
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
309-
***************************************************
448+
Emitted when a user has been logged out successfully.
310449

311-
*Available in Nextcloud 17 and later.*
450+
``\OCP\WorkflowEngine\LoadSettingsScriptsEvent``
451+
***************************************
452+
453+
*Available in Nextcloud 20 and later.*
454+
455+
Emitted when the workflow engine settings page is loaded.
456+
457+
``\OCP\WorkflowEngine\RegisterChecksEvent``
458+
***************************************
312459

313-
This event is emitted so apps can modify the CSP provided by nextcloud. For example if more domains can be used to connect to. Added in Nextcloud 17.
460+
*Available in Nextcloud 18 and later.*
461+
462+
``\OCP\WorkflowEngine\RegisterEntitiesEvent``
463+
***************************************
464+
465+
*Available in Nextcloud 18 and later.*
466+
467+
``\OCP\WorkflowEngine\RegisterOperationsEvent``
468+
***************************************
314469

470+
*Available in Nextcloud 18 and later.*
315471

316472
Symfony event dispatcher
317473
------------------------

0 commit comments

Comments
 (0)