|
10 | 10 | use OCP\Share\IShare; |
11 | 11 |
|
12 | 12 | class Constants { |
13 | | - /** |
14 | | - * @deprecated 17.0.0 - use IShare::TYPE_USER instead |
15 | | - */ |
16 | | - public const SHARE_TYPE_USER = 0; |
17 | | - /** |
18 | | - * @deprecated 17.0.0 - use IShare::TYPE_GROUP instead |
19 | | - */ |
20 | | - public const SHARE_TYPE_GROUP = 1; |
21 | | - // const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider |
22 | | - /** |
23 | | - * @deprecated 17.0.0 - use IShare::TYPE_LINK instead |
24 | | - */ |
25 | | - public const SHARE_TYPE_LINK = 3; |
26 | | - /** |
27 | | - * @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead |
28 | | - */ |
29 | | - public const SHARE_TYPE_EMAIL = 4; |
30 | | - public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it |
31 | | - /** |
32 | | - * @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead |
33 | | - */ |
34 | | - public const SHARE_TYPE_REMOTE = 6; |
35 | | - /** |
36 | | - * @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead |
37 | | - */ |
38 | | - public const SHARE_TYPE_CIRCLE = 7; |
39 | | - /** |
40 | | - * @deprecated 17.0.0 - use IShare::TYPE_GUEST instead |
41 | | - */ |
42 | | - public const SHARE_TYPE_GUEST = 8; |
43 | | - /** |
44 | | - * @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead |
45 | | - */ |
46 | | - public const SHARE_TYPE_REMOTE_GROUP = 9; |
47 | | - /** |
48 | | - * @deprecated 17.0.0 - use IShare::TYPE_ROOM instead |
49 | | - */ |
50 | | - public const SHARE_TYPE_ROOM = 10; |
51 | | - // const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider |
52 | | - /** |
53 | | - * @deprecated 21.0.0 - use IShare::TYPE_DECK instead |
54 | | - */ |
55 | | - public const SHARE_TYPE_DECK = 12; |
56 | | - // const SHARE_TYPE_DECK_USER = 13; // Internal type used by DeckShareProvider |
57 | | - |
58 | | - // Note to developers: Do not add new share types here |
59 | | - |
60 | 13 | public const FORMAT_NONE = -1; |
61 | 14 | public const FORMAT_STATUSES = -2; |
62 | 15 | public const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it |
63 | 16 |
|
64 | 17 | public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls |
65 | 18 |
|
66 | | - public const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility |
| 19 | + public const MIN_TOKEN_LENGTH = 6; // 19,770,609,664 different possible variations |
| 20 | + public const DEFAULT_TOKEN_LENGTH = 15; // 54,960,434,128,018,667,122,720,768 different possible variations |
| 21 | + public const MAX_TOKEN_LENGTH = 32; // 8,167,835,760,036,914,488,254,418,108,462,708,901,695,678,621,570,564,096 different possible variations |
| 22 | + public const TOKEN_LENGTH = self::DEFAULT_TOKEN_LENGTH; // old (oc7) length is 32, keep token length in db at least that for compatibility |
67 | 23 |
|
68 | 24 | protected static $shareTypeUserAndGroups = -1; |
69 | 25 | protected static $shareTypeGroupUserUnique = 2; |
|
0 commit comments