Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorstefan-niedermann <info@niedermann.it>2019-10-20 00:46:52 +0300
committerstefan-niedermann <info@niedermann.it>2019-10-20 00:46:52 +0300
commitc3b1ae84a62d31d0072de0c4a63fbcea9aa75741 (patch)
treef456375f777c135acf49413e758c180431ba0dce /app
parent3be6ccb6e5f785430d850cc31543a9eac5dc8c5b (diff)
#148 Do not show owner of boards in ACL
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/UserDao.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/UserDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/UserDao.java
index cfc9fe13b..e9b9ee65b 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/UserDao.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/UserDao.java
@@ -35,6 +35,7 @@ public interface UserDao extends GenericDao<User> {
" where ju.userId = u.localId and ju.boardId = :boardId and status <> 3" + // not LOCAL_DELETED
" ) " +
"and ( uid LIKE :searchTerm or displayname LIKE :searchTerm or primaryKey LIKE :searchTerm ) " +
+ "and u.localId <> (select b.ownerId from board b where localId = :boardId)" +
"ORDER BY u.displayname")
LiveData<List<User>> searchUserByUidOrDisplayNameForACL(final long accountId, final long boardId, final String searchTerm);
@@ -78,6 +79,7 @@ public interface UserDao extends GenericDao<User> {
" select 1 from accesscontrol ju" +
" where ju.userId = u.localId and ju.boardId = :boardId and status <> 3" + // not LOCAL_DELETED
" ) " +
+ "and u.localId <> (select b.ownerId from board b where localId = :boardId)" +
"ORDER BY u.displayname " +
"LIMIT :topX")
LiveData<List<User>> findProposalsForUsersToAssignForACL(long accountId, long boardId, int topX);