[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the app
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Lee FileLockingHelper.canUserUnlockFile() y sigue cómo el menú de desbordamiento usa el resultado para mostrar la acción de desbloqueo. Compara la comprobación del cliente con la regla del servidor descrita en el issue, incluida la salvedad sobre las carpetas de grupo y el almacenamiento externo. La tarea está terminada cuando el propietario del archivo puede desbloquear un archivo que le pertenece y el comportamiento está cubierto por una prueba pertinente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Steps to reproduce
- Open a Markdown/text file in the Text app (web or Android) and close it without releasing the lock (tab killed, connection lost, app swiped away).
files_lockkeeps the lock with ownertext.- Open that file's overflow menu in the Nextcloud Android app.
Actual behaviour
The file is shown as locked (lock icon, "Locked by Text app — expires in …"), but the menu has no "Unlock file" entry. FileLockingHelper.canUserUnlockFile() only returns true when lockOwnerId == userId, so the file owner is never offered the action.
With the default lock_timeout = -1 the lock never expires; edits then fail with ManuallyLockedException / HTTP 423 and are only recoverable from the web UI (or by waiting for a configured timeout).
Expected behaviour
The file owner can unlock. The server already allows this — OCA\FilesLock\Service\LockService::canUnlock():
if ($request->getType() === ILock::TYPE_USER && $isFileOwner) {
return;
}
Possible fix
Also accept the file owner in FileLockingHelper (file.ownerId == userId), mirroring the server check. I'm preparing a PR.
Caveat: for group folders and external storage the server deliberately skips the file-owner check, so the client cannot mirror the rule exactly there.
Environment
- Server: Nextcloud 34 (AIO),
files_lock34.0.1 - Client: current Play release
- File in personal storage
- Lenguaje dominante
- Kotlin
- Estrellas
- 5.6k
- Forks
- 2k
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 91
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/android
-
Modification time is not preserved when uploading MediaStore content via Android sharePosiblemente ocupada @alperozturk96 la tomó hace 24 días. Abierto3. to review bug feature: transfers
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nextcloud/android#17675 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
0. Needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nextcloud/android#17533 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
RC 34.1.0-01: Duplicated wording in creation menu — "New" prefix + creator name produces "New New document" ("Neu Neues Dokument")Posiblemente ocupada @ChristianTannheimer la tomó hace 90 días. Abierto0. Needs triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
0. Needs triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
0. Needs triage enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/android
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AniTrend/anitrend-v2#1344 ·
Los mantenedores suelen responder en 1 día
-
Non-standard unsaved file dialogAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
zhanghai/MaterialFiles#1659 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Droid-Deck/DroidDeck#1098 ·
Los mantenedores suelen responder en 1 día
-
Blank screen in Download tab after searching with no results and switching tabsPosiblemente ocupada @mangod12 la tomó hoy. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
kiwix/kiwix-android#5211 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
deniscerri/ytdlnis#1430 ·
Los mantenedores suelen responder en 1 día