You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
2
+
// SPDX-License-Identifier: GPL-3.0-or-later
3
+
4
+
///
5
+
/// The [`files_lock`](https://github.com/nextcloud/files_lock) server apps distinguishes between different lock types which are represented by this type.
6
+
///
7
+
publicenumNKLockType:Int,Sendable{
8
+
///
9
+
/// This lock type is initiated by a user manually through the WebUI or Clients and will limit editing capabilities on the file to the lock owning user.
10
+
///
11
+
case user =0
12
+
13
+
///
14
+
/// This lock type is created by collaborative apps like Text or Office to avoid outside changes through WebDAV or other apps.
15
+
///
16
+
case app =1
17
+
18
+
///
19
+
/// This lock type will bind the ownership to the provided lock token.
20
+
/// Any request that aims to modify the file will be required to sent the token, the user itself is not able to write to files without the token.
21
+
/// This will allow to limit the locking to an individual client.
22
+
///
23
+
/// This is mostly used for automatic client locking, e.g. when a file is opened in a client or with WebDAV clients that support native WebDAV locking.
24
+
/// The lock token can be skipped on follow up requests using the OCS API or the X-User-Lock header for WebDAV requests, but in that case the server will not be able to validate the lock ownership when unlocking the file from the client.
0 commit comments