Skip to content

Commit 7e78e7e

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 40f0cc1 commit 7e78e7e

File tree

1 file changed

+147
-10
lines changed

1 file changed

+147
-10
lines changed

developer_manual/app/events.rst

Lines changed: 147 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,20 @@ Available Events
167167

168168
Here you find an overview of the public events that can be consumed in apps. See their source files for more details.
169169

170+
``\OCA\Files\Event\LoadAdditionalScriptsEvent``
171+
***********************************************
172+
173+
*Available in Nextcloud 17 and later.*
174+
175+
This event is triggered when the files app is rendered. It canb e used to add additional scripts to the files app.
176+
177+
``\OCA\Viewer\Event\LoadViewer``
178+
********************************
179+
180+
*Available in Nextcloud 17 and later.*
181+
182+
This event is triggered whenever the viewer is loaded and extensions should be loaded.
183+
170184
``\OCP\Authentication\Events\LoginFailedEvent``
171185
***********************************************
172186

@@ -181,13 +195,129 @@ Emitted when the authentication fails, but only if the login name can be associa
181195

182196
Event emitted by apps whenever there was an interaction with another user or contact.
183197

198+
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.
199+
200+
Emitters should add at least one identifier (uid, email, federated cloud ID) of the recipient of the interaction.
201+
202+
``\OCP\DirectEditing\RegisterDirectEditorEvent``
203+
************************************************
204+
205+
*Available in Nextcloud 18 and later.*
206+
207+
Event to allow to register the direct editor.
208+
209+
``\OCP\Files\Events\BeforeFileScannedEvent``
210+
********************************************
211+
212+
*Available in Nextcloud 18 and later.*
213+
214+
``\OCP\Files\Events\BeforeFolderScannedEvent``
215+
**********************************************
216+
217+
*Available in Nextcloud 18 and later.*
218+
219+
``\OCP\Files\Events\FileCacheUpdated``
220+
**************************************
221+
222+
*Available in Nextcloud 18 and later.*
223+
224+
``\OCP\Files\Events\FileScannedEvent``
225+
**************************************
226+
227+
*Available in Nextcloud 18 and later.*
228+
229+
``\OCP\Files\Events\FolderScannedEvent``
230+
****************************************
231+
232+
*Available in Nextcloud 18 and later.*
233+
234+
``\OCP\Files\Events\NodeAddedToCache``
235+
**************************************
236+
237+
*Available in Nextcloud 18 and later.*
238+
239+
``\OCP\Files\Events\NodeRemovedFromCache``
240+
******************************************
241+
242+
*Available in Nextcloud 18 and later.*
243+
244+
``\OCP\Group\Events\BeforeGroupCreatedEvent``
245+
*********************************************
246+
247+
*Available in Nextcloud 18 and later.*
248+
249+
``\OCP\Group\Events\BeforeGroupDeletedEvent``
250+
*********************************************
251+
252+
*Available in Nextcloud 18 and later.*
253+
254+
``\OCP\Group\Events\BeforeUserAddedEvent``
255+
******************************************
256+
257+
*Available in Nextcloud 18 and later.*
258+
259+
``\OCP\Group\Events\BeforeUserRemovedEvent``
260+
********************************************
261+
262+
*Available in Nextcloud 18 and later.*
263+
264+
``\OCP\Group\Events\GroupCreatedEvent``
265+
***************************************
266+
267+
*Available in Nextcloud 18 and later.*
268+
269+
``\OCP\Group\Events\GroupDeletedEvent``
270+
***************************************
271+
272+
*Available in Nextcloud 18 and later.*
273+
274+
``\OCP\Group\Events\UserAddedEvent``
275+
************************************
276+
277+
*Available in Nextcloud 18 and later.*
278+
279+
``\OCP\Group\Events\UserRemovedEvent``
280+
**************************************
281+
282+
*Available in Nextcloud 18 and later.*
184283
``\OCP\Mail\Events\BeforeMessageSent``
185284
**************************************
186285

187286
*Available in Nextcloud 19 and later.*
188287

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

290+
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
291+
***************************************************
292+
293+
*Available in Nextcloud 17 and later.*
294+
295+
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.
296+
297+
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.
298+
299+
``\OCP\Security\Events\GenerateSecurePasswordEvent``
300+
****************************************************
301+
302+
*Available in Nextcloud 18 and later.*
303+
304+
``\OCP\Security\Events\ValidatePasswordPolicyEvent``
305+
****************************************************
306+
307+
*Available in Nextcloud 18 and later.*
308+
309+
``\OCP\Security\FeaturePolicy\AddFeaturePolicyEvent``
310+
****************************************************
311+
312+
*Available in Nextcloud 17 and later.*
313+
314+
Event that allows to register a feature policy header to a request.
315+
316+
``\OCP\Share\Events\ShareCreatedEvent``
317+
*******************************************
318+
319+
*Available in Nextcloud 18 and later.*
320+
191321
``\OCP\Share\Events\VerifyMountPointEvent``
192322
*******************************************
193323

@@ -203,10 +333,10 @@ Emitted before a user is logged in via remember-me cookies.
203333
``\OCP\User\Events\UserLoggedInWithCookieEvent``
204334
************************************************
205335

206-
Emitted when a user has been succesfully logged in via remember-me cookies.
207-
208336
*Available in Nextcloud 18 and later.*
209337

338+
Emitted when a user has been succesfully logged in via remember-me cookies.
339+
210340
``\OCP\User\Events\BeforePasswordUpdatedEvent``
211341
***********************************************
212342

@@ -240,15 +370,11 @@ Emitted when a new user has been created on the back-end.
240370

241371
*Available in Nextcloud 18 and later.*
242372

243-
Emitted before a user is logged out.
244-
245373
``\OCP\User\Events\UserDeletedEvent``
246374
*************************************
247375

248376
*Available in Nextcloud 18 and later.*
249377

250-
Emitted when a user has been logged out successfully.
251-
252378
``\OCP\User\Events\BeforeUserLoggedInEvent``
253379
********************************************
254380

@@ -259,6 +385,8 @@ Emitted when a user has been logged out successfully.
259385

260386
*Available in Nextcloud 18 and later.*
261387

388+
Emitted before a user is logged out.
389+
262390
``\OCP\User\Events\CreateUserEvent``
263391
************************************
264392

@@ -284,13 +412,22 @@ Emitted when a user has been logged out successfully.
284412

285413
*Available in Nextcloud 18 and later.*
286414

287-
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
288-
***************************************************
415+
Emitted when a user has been logged out successfully.
289416

290-
*Available in Nextcloud 17 and later.*
417+
``\OCP\WorkflowEngine\RegisterChecksEvent``
418+
***************************************
419+
420+
*Available in Nextcloud 18 and later.*
421+
422+
``\OCP\WorkflowEngine\RegisterEntitiesEvent``
423+
***************************************
291424

292-
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.
425+
*Available in Nextcloud 18 and later.*
293426

427+
``\OCP\WorkflowEngine\RegisterOperationsEvent``
428+
***************************************
429+
430+
*Available in Nextcloud 18 and later.*
294431

295432
Symfony event dispatcher
296433
------------------------

0 commit comments

Comments
 (0)