2012-11-11 09:52:23 -05:00
|
|
|
|
<?php
|
2021-04-26 06:33:36 -04:00
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2012-11-11 09:52:23 -05:00
|
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2012-11-11 09:52:23 -05:00
|
|
|
|
*/
|
2015-02-26 05:37:37 -05:00
|
|
|
|
|
2024-05-23 03:26:56 -04:00
|
|
|
|
// This file defines common constants used in Nextcloud
|
2015-02-26 05:37:37 -05:00
|
|
|
|
|
2012-11-11 09:52:23 -05:00
|
|
|
|
namespace OCP;
|
|
|
|
|
|
|
2015-04-16 11:00:08 -04:00
|
|
|
|
/**
|
|
|
|
|
|
* Class Constants
|
|
|
|
|
|
*
|
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
|
*/
|
2014-11-25 10:27:27 -05:00
|
|
|
|
class Constants {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* CRUDS permissions.
|
2015-04-18 19:04:59 -04:00
|
|
|
|
* @since 8.0.0
|
2014-11-25 10:27:27 -05:00
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const PERMISSION_CREATE = 4;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const PERMISSION_READ = 1;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const PERMISSION_UPDATE = 2;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const PERMISSION_DELETE = 8;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const PERMISSION_SHARE = 16;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const PERMISSION_ALL = 31;
|
2014-11-25 10:27:27 -05:00
|
|
|
|
|
2015-04-18 19:04:59 -04:00
|
|
|
|
/**
|
2016-02-11 15:45:25 -05:00
|
|
|
|
* @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no
|
|
|
|
|
|
* longer support windows as server platform.
|
2015-04-18 19:04:59 -04:00
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
|
public const FILENAME_INVALID_CHARS = '\\/';
|
2020-12-11 18:25:10 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @since 21.0.0 – default value for autocomplete/search results limit,
|
|
|
|
|
|
* cf. sharing.maxAutocompleteResults in config.sample.php.
|
|
|
|
|
|
*/
|
|
|
|
|
|
public const SHARING_MAX_AUTOCOMPLETE_RESULTS_DEFAULT = 25;
|
2014-11-25 10:27:27 -05:00
|
|
|
|
}
|