Skip to content

Commit 6ca7040

Browse files
MorrisJobkebackportbot[bot]
authored andcommitted
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 6ca7040

File tree

1 file changed

+145
-10
lines changed

1 file changed

+145
-10
lines changed

developer_manual/app/events.rst

Lines changed: 145 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,129 @@ Emitted when the authentication fails, but only if the login name can be associa
181181

182182
Event emitted by apps whenever there was an interaction with another user or contact.
183183

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

187272
*Available in Nextcloud 19 and later.*
188273

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

276+
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
277+
***************************************************
278+
279+
*Available in Nextcloud 17 and later.*
280+
281+
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.
282+
283+
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.
284+
285+
``\OCP\Security\Events\GenerateSecurePasswordEvent``
286+
****************************************************
287+
288+
*Available in Nextcloud 18 and later.*
289+
290+
``\OCP\Security\Events\ValidatePasswordPolicyEvent``
291+
****************************************************
292+
293+
*Available in Nextcloud 18 and later.*
294+
295+
``\OCP\Security\FeaturePolicy\AddFeaturePolicyEvent``
296+
****************************************************
297+
298+
*Available in Nextcloud 17 and later.*
299+
300+
Event that allows to register a feature policy header to a request.
301+
302+
``\OCP\Share\Events\ShareCreatedEvent``
303+
*******************************************
304+
305+
*Available in Nextcloud 18 and later.*
306+
191307
``\OCP\Share\Events\VerifyMountPointEvent``
192308
*******************************************
193309

@@ -203,10 +319,10 @@ Emitted before a user is logged in via remember-me cookies.
203319
``\OCP\User\Events\UserLoggedInWithCookieEvent``
204320
************************************************
205321

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

324+
Emitted when a user has been succesfully logged in via remember-me cookies.
325+
210326
``\OCP\User\Events\BeforePasswordUpdatedEvent``
211327
***********************************************
212328

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

241357
*Available in Nextcloud 18 and later.*
242358

243-
Emitted before a user is logged out.
244-
245359
``\OCP\User\Events\UserDeletedEvent``
246360
*************************************
247361

248362
*Available in Nextcloud 18 and later.*
249363

250-
Emitted when a user has been logged out successfully.
251-
252364
``\OCP\User\Events\BeforeUserLoggedInEvent``
253365
********************************************
254366

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

260372
*Available in Nextcloud 18 and later.*
261373

374+
Emitted before a user is logged out.
375+
262376
``\OCP\User\Events\CreateUserEvent``
263377
************************************
264378

@@ -274,6 +388,11 @@ Emitted when a user has been logged out successfully.
274388

275389
*Available in Nextcloud 18 and later.*
276390

391+
``\OCP\User\Events\UserLiveStatusEvent``
392+
****************************************
393+
394+
*Available in Nextcloud 20 and later.*
395+
277396
``\OCP\User\Events\UserLoggedInEvent``
278397
**************************************
279398

@@ -284,13 +403,29 @@ Emitted when a user has been logged out successfully.
284403

285404
*Available in Nextcloud 18 and later.*
286405

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

290-
*Available in Nextcloud 17 and later.*
408+
``\OCP\WorkflowEngine\LoadSettingsScriptsEvent``
409+
***************************************
410+
411+
*Available in Nextcloud 20 and later.*
412+
413+
Emitted when the workflow engine settings page is loaded.
414+
415+
``\OCP\WorkflowEngine\RegisterChecksEvent``
416+
***************************************
417+
418+
*Available in Nextcloud 18 and later.*
419+
420+
``\OCP\WorkflowEngine\RegisterEntitiesEvent``
421+
***************************************
291422

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.
423+
*Available in Nextcloud 18 and later.*
293424

425+
``\OCP\WorkflowEngine\RegisterOperationsEvent``
426+
***************************************
427+
428+
*Available in Nextcloud 18 and later.*
294429

295430
Symfony event dispatcher
296431
------------------------

0 commit comments

Comments
 (0)