diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml new file mode 100644 index 000000000..4e41c31dd --- /dev/null +++ b/.github/workflows/command-rebase.yml @@ -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" diff --git a/admin_manual/configuration_server/background_jobs_configuration.rst b/admin_manual/configuration_server/background_jobs_configuration.rst index a28fe1e67..47dd336b2 100644 --- a/admin_manual/configuration_server/background_jobs_configuration.rst +++ b/admin_manual/configuration_server/background_jobs_configuration.rst @@ -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** (1–5 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]:///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 diff --git a/admin_manual/configuration_server/config_sample_php_parameters.rst b/admin_manual/configuration_server/config_sample_php_parameters.rst index 33d956133..9ec2f2e09 100644 --- a/admin_manual/configuration_server/config_sample_php_parameters.rst +++ b/admin_manual/configuration_server/config_sample_php_parameters.rst @@ -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. diff --git a/admin_manual/configuration_server/domain_change.rst b/admin_manual/configuration_server/domain_change.rst new file mode 100644 index 000000000..c51a33030 --- /dev/null +++ b/admin_manual/configuration_server/domain_change.rst @@ -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. diff --git a/admin_manual/configuration_server/index.rst b/admin_manual/configuration_server/index.rst index 1bf061493..befeb3dca 100644 --- a/admin_manual/configuration_server/index.rst +++ b/admin_manual/configuration_server/index.rst @@ -22,5 +22,6 @@ Nextcloud configuration theming oauth2 admin_delegation_configuration + domain_change .. Intentional disabled antivirus_configuration diff --git a/admin_manual/configuration_user/two_factor-auth.rst b/admin_manual/configuration_user/two_factor-auth.rst index dfd161a57..d1989ca46 100644 --- a/admin_manual/configuration_user/two_factor-auth.rst +++ b/admin_manual/configuration_user/two_factor-auth.rst @@ -13,7 +13,7 @@ Several 2FA apps are already available including a Telegram/Signal/SMS gateway and `U2F `_. -Developers can `build new two-factor provider apps `_. +Developers can `build new two-factor provider apps `_. .. TODO ON RELEASE: Update version number above on release diff --git a/admin_manual/installation/nginx-root.conf.sample b/admin_manual/installation/nginx-root.conf.sample index 99a6da5c1..6616f89f9 100644 --- a/admin_manual/installation/nginx-root.conf.sample +++ b/admin_manual/installation/nginx-root.conf.sample @@ -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 diff --git a/admin_manual/installation/nginx-subdir.conf.sample b/admin_manual/installation/nginx-subdir.conf.sample index 87718cb1a..199cce264 100644 --- a/admin_manual/installation/nginx-subdir.conf.sample +++ b/admin_manual/installation/nginx-subdir.conf.sample @@ -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 diff --git a/admin_manual/release_schedule.rst b/admin_manual/release_schedule.rst index 2ea39b409..55d6cac05 100644 --- a/admin_manual/release_schedule.rst +++ b/admin_manual/release_schedule.rst @@ -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 `_. +You can find the detailed schedule for major and maintenance releases at: `detailed 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 `_. +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 `_. 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 `_ offered by `Nextcloud GmbH `_. @@ -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. diff --git a/developer_manual/basics/storage/filesystem.rst b/developer_manual/basics/storage/filesystem.rst index c073a1265..7e4331196 100644 --- a/developer_manual/basics/storage/filesystem.rst +++ b/developer_manual/basics/storage/filesystem.rst @@ -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 `_ Writing to a file ----------------- diff --git a/developer_manual/basics/storage/migrations.rst b/developer_manual/basics/storage/migrations.rst index beb0e067e..43b29f740 100644 --- a/developer_manual/basics/storage/migrations.rst +++ b/developer_manual/basics/storage/migrations.rst @@ -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`: diff --git a/developer_manual/digging_deeper/index.rst b/developer_manual/digging_deeper/index.rst index bd4d116f2..ef9feadd4 100644 --- a/developer_manual/digging_deeper/index.rst +++ b/developer_manual/digging_deeper/index.rst @@ -31,3 +31,4 @@ Digging deeper status security profile + user_migration diff --git a/developer_manual/digging_deeper/search.rst b/developer_manual/digging_deeper/search.rst index d4b0801f6..084fd7319 100644 --- a/developer_manual/digging_deeper/search.rst +++ b/developer_manual/digging_deeper/search.rst @@ -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 diff --git a/developer_manual/digging_deeper/user_migration.rst b/developer_manual/digging_deeper/user_migration.rst new file mode 100644 index 000000000..ff4798ddb --- /dev/null +++ b/developer_manual/digging_deeper/user_migration.rst @@ -0,0 +1,154 @@ +============== +User migration +============== + +The `User migration app `_ 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 + + 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`. + +.. code-block:: php + + registerUserMigrator(MyAppMigrator::class); + } + + public function boot(IBootContext $context): void { + } + } diff --git a/user_manual/index.rst b/user_manual/index.rst index 29d099589..53b609253 100644 --- a/user_manual/index.rst +++ b/user_manual/index.rst @@ -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 `_.