Merge branch 'nextcloud:master' into master

This commit is contained in:
Nathan Haines
2022-04-27 18:06:29 -07:00
committed by GitHub
15 changed files with 277 additions and 82 deletions

46
.github/workflows/command-rebase.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
name: Rebase command
on:
issue_comment:
types: created
jobs:
rebase:
runs-on: ubuntu-latest
# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"
- name: Checkout the latest code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@v2
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"

View File

@@ -23,6 +23,8 @@ Parameters
``maintenance_window_start``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note:: This setting is only taken into account in ``cron`` mode.
In the ``config/config.php`` file you can specify this config.
Some background jobs only run once a day. When an hour is defined (timezone is UTC)
for this config, the background jobs which advertise themselves as not time sensitive
@@ -35,26 +37,30 @@ Cron jobs
---------
You can schedule cron jobs in three ways -- using AJAX, Webcron, or cron. The
default method is to use AJAX. However, the recommended method is to use cron.
default method is to use AJAX. However, the recommended method is to use cron.
The following sections describe the differences between each method.
AJAX
^^^^
The AJAX scheduling method is the default option. Unfortunately, however, it is
**Use case: Single user instance**
The AJAX scheduling method is the default option. Unfortunately, however, it is
also the least reliable. Each time a user visits the Nextcloud page, a single
background job is executed. The advantage of this mechanism is that it does not
require access to the system nor registration with a third party service. The
disadvantage of this mechanism, when compared to the Webcron service, is that it
requires regular visits to the page for it to be triggered.
.. note:: Especially when using the Activity App or external storages, where new
files are added, updated or deleted one of the two methods below should be
preferred.
.. warning:: Especially when using the Activity app or external storages, where new
files are added, updated or deleted, or when **multiple users** use the server, it
is recommended to use ``cron``.
Webcron
^^^^^^^
**Use case: Very small instance** (15 users depending on the usage)
By registering your Nextcloud ``cron.php`` script address at an external webcron
service (for example, easyCron_), you ensure that background jobs are executed
regularly. To use this type of service with your server, you must be able to
@@ -62,6 +68,12 @@ access your server using the Internet. For example::
URL to call: http[s]://<domain-of-your-server>/nextcloud/cron.php
.. warning:: Since WebCron is still executed via web, the webserver in most case limits the
resources on the execution. To avoid interrupts inside jobs only 1 jobs is executed
per call. When webcron is called once every 5 minutes this limits your instance to
288 background jobs per day, which is only suitable for very small instance.
For bigger instances it is recommended to use ``cron``.
.. _system-cron-configuration-label:
Cron

View File

@@ -1744,6 +1744,21 @@ filesystem instead of the database to keep the share information.
Defaults to ``\OC\Share20\ProviderFactory``
::
'sharing.enable_mail_link_password_expiration' => false,
Enables expiration for link share passwords sent by email (sharebymail).
The passwords will expire after the configured interval, the users can
still request a new one in the public link page.
::
'sharing.mail_link_password_expiration_interval' => 3600,
Expiration interval for passwords, in seconds.
::
'sharing.maxAutocompleteResults' => 25,
@@ -2397,6 +2412,18 @@ Enable profile globally
Defaults to ``true``
::
'enable_file_metadata' => true,
Enable file metadata collection
This is helpful for the mobile clients and will enable a few optimization in
the future for the preview generation.
Note that when enabled, this data will be stored in the database and might increase
the database storage.
.. ALL_OTHER_SECTIONS_END
.. Generated content above. Don't change this.

View File

@@ -0,0 +1,8 @@
=====================
Domain Change
=====================
Changing the domain after the first setup is currently not supported by Nextcloud. That is mainly because Nextcloud's apps don't support changing the domain after they are set up.
.. note::
This documentation will get updated with steps what needs to be done if you want to change the domain as soon as this feature is available.

View File

@@ -22,5 +22,6 @@ Nextcloud configuration
theming
oauth2
admin_delegation_configuration
domain_change
.. Intentional disabled antivirus_configuration

View File

@@ -13,7 +13,7 @@ Several 2FA apps are already available including
a Telegram/Signal/SMS gateway and `U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_.
Developers can `build new two-factor provider apps <https://docs.nextcloud.com/server/latest/developer_manual/app/two-factor-provider.html>`_.
Developers can `build new two-factor provider apps <https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/two-factor-provider.html>`_.
.. TODO ON RELEASE: Update version number above on release

View File

@@ -15,6 +15,9 @@ server {
listen [::]:80;
server_name cloud.example.com;
# Prevent nginx HTTP Server Detection
server_tokens off;
# Enforce HTTPS
return 301 https://$server_name$request_uri;
}
@@ -32,6 +35,9 @@ server {
ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
# Prevent nginx HTTP Server Detection
server_tokens off;
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option

View File

@@ -14,6 +14,9 @@ server {
listen [::]:80;
server_name cloud.example.com;
# Prevent nginx HTTP Server Detection
server_tokens off;
# Enforce HTTPS just for `/nextcloud`
location /nextcloud {
return 301 https://$server_name$request_uri;
@@ -33,6 +36,9 @@ server {
ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
# Prevent nginx HTTP Server Detection
server_tokens off;
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option

View File

@@ -2,22 +2,12 @@
Maintenance and release schedule
================================
This page gives an overview of the currently supported and released versions as well as basic release scheduling.
+--------+-------------------+------------------+
| | release date | end of life |
+========+===================+==================+
| **23** | 2021-11-30 | 2022-11 |
+--------+-------------------+------------------+
| **22** | 2021-07-06 | 2022-07 |
+--------+-------------------+------------------+
Find the detailed schedule for major and maintenance releases at: `GitHub <https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule>`_.
You can find the detailed schedule for major and maintenance releases at: `detailed schedule <https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule>`_.
Major releases
--------------
Major releases are typically scheduled once every 4 months with the first 10 weeks being the development phase followed by freeze phase with four beta release, two RCs and one final each one with an interval of 1 week. Specific dates for each release can be found on `GitHub <https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule>`_.
Major releases are typically scheduled once every 4 months with the first 10 weeks being the development phase followed by freeze phase with four beta release, two RCs and one final each one with an interval of 1 week. Specific dates for each release can be found on `detailed schedule <https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule>`_.
Major releases are planned to be actively maintained for at least 8 months after their release. For long term support options check out the `Nextcloud Subscription <https://nextcloud.com/enterprise/>`_ offered by `Nextcloud GmbH <https://nextcloud.com>`_.
@@ -26,61 +16,8 @@ Maintenance releases
Maintenance releases are scheduled in a 4 week cycle with one week before the release date having the freeze and RC 1.
Older versions
--------------
Critical changes
----------------
+----------+----------------+-------------+-------------------------+
| | release date | end of life | latest version |
+==========+================+=============+=========================+
| **21** | 2021-02-22 | 2022-02 | 21.0.9 (2022-02-15) |
+----------+----------------+-------------+-------------------------+
| **20** | 2020-10-03 | 2021-10 | 20.0.14 (2021-11-11) |
+----------+----------------+-------------+-------------------------+
| **19** | 2020-06-03 | 2021-06 | 19.0.13 (2021-07-01) |
+----------+----------------+-------------+-------------------------+
| **18** | 2020-01-16 | 2021-01 | 18.0.14 (2021-01-27) |
+----------+----------------+-------------+-------------------------+
| **17** | 2019-09-30 | 2020-10 | 17.0.10 (2020-10-08) |
+----------+----------------+-------------+-------------------------+
| **18** | 2020-01-16 | 2021-01 | 18.0.14 (2021-01-27) |
+----------+----------------+-------------+-------------------------+
| **17** | 2019-09-30 | 2020-10 | 17.0.10 (2020-10-08) |
+----------+----------------+-------------+-------------------------+
| **16** | 2019-04-25 | 2020-06 | 16.0.11 (2020-06-04) |
+----------+----------------+-------------+-------------------------+
| **15** | 2018-12-10 | 2019-12 | 15.0.14 (2019-12-19) |
+----------+----------------+-------------+-------------------------+
| **14** | 2018-09-10 | 2019-09 | 14.0.14 (2019-08-15) |
+----------+----------------+-------------+-------------------------+
| **13** | 2018-02-06 | 2019-02 | 13.0.12 (2019-02-28) |
+----------+----------------+-------------+-------------------------+
| **12** | 2017-05-22 | 2018-11 | 12.0.13 (2018-11-22) |
+----------+----------------+-------------+-------------------------+
| **11** | 2016-12-13 | 2018-03 | 11.0.8 (2018-03-15) |
+----------+----------------+-------------+-------------------------+
| **10** | 2016-08-25 | 2017-08 | 10.0.6 (2017-08-07) |
+----------+----------------+-------------+-------------------------+
| **9.0** | 2016-03-08 | 2017-10 | 9.0.58 (2017-04-24) |
+----------+----------------+-------------+-------------------------+
| **8.2** | 2015-10-20 | 2017-05 | 8.2.11 (2017-04-18) |
+----------+----------------+-------------+-------------------------+
| **8.1** | 2015-07-07 | 2017-02 | 8.1.12 (2017-02-02) |
+----------+----------------+-------------+-------------------------+
| **8.0** | 2015-02-09 | 2016-10 | 8.0.16 (2016-11-08) |
+----------+----------------+-------------+-------------------------+
| **7.0** | 2014-06-23 | 2016-05 | 7.0.15 (2016-05-12) |
+----------+----------------+-------------+-------------------------+
| **6.0** | 2013-12-11 | 2015-09 | 6.0.9 (2015-07-07) |
+----------+----------------+-------------+-------------------------+
| **5.0** | 2013-03-14 | 2015-03 | 5.0.19 (2015-03-11) |
+----------+----------------+-------------+-------------------------+
| **4.5** | 2012-10-10 | 2013-07 | 4.5.13 (2013-07-10) |
+----------+----------------+-------------+-------------------------+
| **4.0** | 2012-05-22 | 2013-07 | 4.0.16 (2013-07-06) |
+----------+----------------+-------------+-------------------------+
| **3.0** | 2012-01-31 | 2012-04 | 3.0.3 (2012-04-27) |
+----------+----------------+-------------+-------------------------+
| **2.0** | 2011-10-11 | 2012-01 | |
+----------+----------------+-------------+-------------------------+
| **1.0** | 2010-06-24 | 2011-10 | |
+----------+----------------+-------------+-------------------------+
You can find important documentation for app developers here: https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/index.html
Each document lists a link to the breaking changes of the corresponding release.

View File

@@ -7,7 +7,7 @@ Filesystem
Because users can choose their storage backend, the filesystem should be accessed by using the appropriate filesystem classes.
Filesystem classes can be injected automatically with dependency injection. This is the user filesystem.
For a simplified filestystem for app specific data see `IAppData <../appdata.html>`_
For a simplified filestystem for app specific data see `IAppData <appdata.html>`_
Writing to a file
-----------------

View File

@@ -125,7 +125,7 @@ Console commands
There are some console commands, which should help developers to create or deal
with migrations, which are only available if you are running your
Nextcloud in debug mode:
Nextcloud **in debug mode**:
* `migrations:execute`: Executes a single migration version manually.
* `migrations:generate`:

View File

@@ -31,3 +31,4 @@ Digging deeper
status
security
profile
user_migration

View File

@@ -247,7 +247,7 @@ Next, you'll see a dummy provider that returns a static set of results.
}
}
Each of the result result entries has
Each of the result entry has
* A thumbnail or icon that is a (relative) URL
* A title, e.g. the name of a file

View File

@@ -0,0 +1,154 @@
==============
User migration
==============
The `User migration app <https://apps.nextcloud.com/apps/user_migration>`_ may
be installed to allow migration of user data.
App developers can integrate into User migration and provide ways to export
and import the app data of a user.
Register a migrator
-------------------
A migrator is represented by a class implementing the
``OCP\\UserMigration\\IMigrator`` interface. This class is instantiated
whenever a user export or import begins.
.. code-block:: php
<?php
declare(strict_types=1);
namespace OCA\MyApp\UserMigration;
use OCA\MyApp\AppInfo\Application;
use OCA\MyApp\IMyAppManager;
use OCP\IL10N;
use OCP\IUser;
use OCP\UserMigration\IExportDestination;
use OCP\UserMigration\IImportSource;
use OCP\UserMigration\IMigrator;
use OCP\UserMigration\TMigratorBasicVersionHandling;
use OCP\UserMigration\UserMigrationException;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
class MyAppMigrator implements IMigrator {
use TMigratorBasicVersionHandling;
private IMyAppManager $myAppManager;
private IL10N $l10n;
private const PATH_ROOT = Application::APP_ID . '/';
private const PATH_MYAPP_FILE = MyAppMigrator::PATH_ROOT . 'myapp.json';
public function __construct(
IMyAppManager $myAppManager,
IL10N $l10n
) {
$this->myAppManager = $myAppManager;
$this->l10n = $l10n;
}
/**
* Export user data
*
* @throws UserMigrationException
* @since 24.0.0
*/
public function export(IUser $user, IExportDestination $exportDestination, OutputInterface $output): void {
$output->writeln('Exporting myapp information in ' . MyAppMigrator::PATH_MYAPP_FILE . '…');
try {
$data = $this->myAppManager->getUserData($user);
$exportDestination->addFileContents(MyAppMigrator::PATH_MYAPP_FILE, json_encode($data));
} catch (Throwable $e) {
throw new UserMigrationException('Could not export myapp information', 0, $e);
}
}
/**
* Import user data
*
* @throws UserMigrationException
* @since 24.0.0
*/
public function import(IUser $user, IImportSource $importSource, OutputInterface $output): void {
if ($importSource->getMigratorVersion($this->getId()) === null) {
$output->writeln('No version for ' . static::class . ', skipping import…');
return;
}
$output->writeln('Importing myapp information from ' . MyAppMigrator::PATH_MYAPP_FILE . '…');
$data = json_decode($importSource->getFileContents(MyAppMigrator::PATH_MYAPP_FILE), true, 512, JSON_THROW_ON_ERROR);
try {
$this->myAppManager->setUserData($user, $data);
} catch (Throwable $e) {
throw new UserMigrationException('Could not import myapp information', 0, $e);
}
}
/**
* Returns the unique ID
*
* @since 24.0.0
*/
public function getId(): string {
return 'myapp';
}
/**
* Returns the display name
*
* @since 24.0.0
*/
public function getDisplayName(): string {
return $this->l10n->t('My App');
}
/**
* Returns the description
*
* @since 24.0.0
*/
public function getDescription(): string {
return $this->l10n->t('My App information');
}
}
The ``MyAppMigrator`` class needs to be registered during the :ref:`app bootstrap<Bootstrapping>`.
.. code-block:: php
<?php
declare(strict_types=1);
namespace OCA\MyApp\AppInfo;
use OCA\MyApp\UserMigration\MyAppMigrator;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
class Application extends App implements IBootstrap {
public const APP_ID = 'myapp';
public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
}
public function register(IRegistrationContext $context): void {
$context->registerUserMigrator(MyAppMigrator::class);
}
public function boot(IBootContext $context): void {
}
}

View File

@@ -16,13 +16,10 @@ You can share one or more files and folders on your computer, and synchronize
them with your Nextcloud server. Place files in your local shared directories,
and those files are immediately synchronized to the server and to other devices
using the Nextcloud Desktop Sync Client, Android app, or iOS app. To
learn more about the Nextcloud desktop and mobile clients, please refer to
their respective manuals:
learn more about the Nextcloud desktop client, please refer to:
* `Nextcloud Desktop Client`_
* `Nextcloud Android App`_
.. _`Nextcloud Desktop Client`: https://docs.nextcloud.com/desktop/latest/
.. _`Nextcloud Android App`: https://docs.nextcloud.com/android/
`Help translate <https://www.transifex.com/nextcloud/nextcloud-user-documentation/>`_.