Skip to content

Commit

Permalink
Document existing events
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
MorrisJobke authored and backportbot[bot] committed Aug 10, 2020
1 parent 40f0cc1 commit 6ca7040
Showing 1 changed file with 145 additions and 10 deletions.
155 changes: 145 additions & 10 deletions developer_manual/app/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,129 @@ Emitted when the authentication fails, but only if the login name can be associa

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

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.

Emitters should add at least one identifier (uid, email, federated cloud ID) of the recipient of the interaction.

``\OCP\DirectEditing\RegisterDirectEditorEvent``
************************************************

*Available in Nextcloud 18 and later.*

Event to allow to register the direct editor.

``\OCP\Files\Events\BeforeFileScannedEvent``
********************************************

*Available in Nextcloud 18 and later.*

``\OCP\Files\Events\BeforeFolderScannedEvent``
**********************************************

*Available in Nextcloud 18 and later.*

``\OCP\Files\Events\FileCacheUpdated``
**************************************

*Available in Nextcloud 18 and later.*

``\OCP\Files\Events\FileScannedEvent``
**************************************

*Available in Nextcloud 18 and later.*

``\OCP\Files\Events\FolderScannedEvent``
****************************************

*Available in Nextcloud 18 and later.*

``\OCP\Files\Events\NodeAddedToCache``
**************************************

*Available in Nextcloud 18 and later.*

``\OCP\Files\Events\NodeRemovedFromCache``
******************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\BeforeGroupCreatedEvent``
*********************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\BeforeGroupDeletedEvent``
*********************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\BeforeUserAddedEvent``
******************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\BeforeUserRemovedEvent``
********************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\GroupCreatedEvent``
***************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\GroupDeletedEvent``
***************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\UserAddedEvent``
************************************

*Available in Nextcloud 18 and later.*

``\OCP\Group\Events\UserRemovedEvent``
**************************************

*Available in Nextcloud 18 and later.*
``\OCP\Mail\Events\BeforeMessageSent``
**************************************

*Available in Nextcloud 19 and later.*

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

``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
***************************************************

*Available in Nextcloud 17 and later.*

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.

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.

``\OCP\Security\Events\GenerateSecurePasswordEvent``
****************************************************

*Available in Nextcloud 18 and later.*

``\OCP\Security\Events\ValidatePasswordPolicyEvent``
****************************************************

*Available in Nextcloud 18 and later.*

``\OCP\Security\FeaturePolicy\AddFeaturePolicyEvent``
****************************************************

*Available in Nextcloud 17 and later.*

Event that allows to register a feature policy header to a request.

``\OCP\Share\Events\ShareCreatedEvent``
*******************************************

*Available in Nextcloud 18 and later.*

``\OCP\Share\Events\VerifyMountPointEvent``
*******************************************

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

Emitted when a user has been succesfully logged in via remember-me cookies.

*Available in Nextcloud 18 and later.*

Emitted when a user has been succesfully logged in via remember-me cookies.

``\OCP\User\Events\BeforePasswordUpdatedEvent``
***********************************************

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

*Available in Nextcloud 18 and later.*

Emitted before a user is logged out.

``\OCP\User\Events\UserDeletedEvent``
*************************************

*Available in Nextcloud 18 and later.*

Emitted when a user has been logged out successfully.

``\OCP\User\Events\BeforeUserLoggedInEvent``
********************************************

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

*Available in Nextcloud 18 and later.*

Emitted before a user is logged out.

``\OCP\User\Events\CreateUserEvent``
************************************

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

*Available in Nextcloud 18 and later.*

``\OCP\User\Events\UserLiveStatusEvent``
****************************************

*Available in Nextcloud 20 and later.*

``\OCP\User\Events\UserLoggedInEvent``
**************************************

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

*Available in Nextcloud 18 and later.*

``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
***************************************************
Emitted when a user has been logged out successfully.

*Available in Nextcloud 17 and later.*
``\OCP\WorkflowEngine\LoadSettingsScriptsEvent``
***************************************

*Available in Nextcloud 20 and later.*

Emitted when the workflow engine settings page is loaded.

``\OCP\WorkflowEngine\RegisterChecksEvent``
***************************************

*Available in Nextcloud 18 and later.*

``\OCP\WorkflowEngine\RegisterEntitiesEvent``
***************************************

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

``\OCP\WorkflowEngine\RegisterOperationsEvent``
***************************************

*Available in Nextcloud 18 and later.*

Symfony event dispatcher
------------------------
Expand Down

0 comments on commit 6ca7040

Please sign in to comment.