Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Added APIs
- New service ``OCP\RichObjectStrings\IRichTextFormatter`` to format rich text into parsed plain text using its ``richToParsed`` method.
- New magic query parameter ``forceLanguage`` to force a specific language for a web request (API or frontend). See :ref:`Forcing language for a given call<api-force-language>`.
- The new WebDAV property ``nc:hide-download`` was added to indicate if download actions should be hidden for a shared file or folder.
- ``OCP\Security\PasswordContext`` was added, this allows defining a context for which a password should be used.
It is used by the ``GenerateSecurePasswordEvent`` and ``ValidatePasswordPolicyEvent`` allowing to apply different rules for different contexts.

Changed APIs
^^^^^^^^^^^^
Expand Down Expand Up @@ -163,6 +165,8 @@ Changed APIs
- ``OCP\Files\Storage::needsPartFile`` method was moved to interface ``OCP\Files\Storage\IStorage``.
- The constructor was removed from interface ``OCP\Files\Storage\IStorage`` so that wrappers can use DI in their constructor. If your storage implementation is supposed to be built by calling the constructor, please implement the new interface ``OCP\Files\Storage\IConstructableStorage``.
- ``OCP\IUser::getFirstLogin`` method was added to get first known login of a user. It will return a unix timestamp, or 0 if the user never logged in, or -1 if this data is not known (meaning the first login of this user was from before upgrading to 31).
- ``OCP\Security\GenerateSecurePasswordEvent`` and ``OCP\Security\ValidatePasswordPolicyEvent`` now have a ``getContext`` method returning the password context,
this allows to apply different rules for different contexts.

Deprecated APIs
^^^^^^^^^^^^^^^
Expand Down
8 changes: 7 additions & 1 deletion developer_manual/basics/_available_events_ocp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,10 @@ that it is not possible to use the `disallowXYZ` functions.

.. versionadded:: 18

Event to request a secure password to be generated
Event to request a secure password to be generated.

Since Nextcloud 31 this event also provides a ``getContext`` method
allowing to apply different rules for different password context like account passwords or share passwords.

``OCP\Security\Events\ValidatePasswordPolicyEvent``
***************************************************
Expand All @@ -662,6 +665,9 @@ This event can be emitted to request a validation of a password.
If a password policy app is installed and the password
is invalid, an `\OCP\HintException` will be thrown.

Since Nextcloud 31 this event also provides a ``getContext`` method
allowing to apply different rules for different password context like account passwords or share passwords.

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

Expand Down