Require 16 for collections
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -5,7 +5,7 @@ clone:
|
|||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
check-app-compatbility:
|
check-app-compatbility:
|
||||||
image: nextcloudci/php7.0:php7.0-17
|
image: nextcloudci/php7.1:php7.1-15
|
||||||
environment:
|
environment:
|
||||||
- APP_NAME=deck
|
- APP_NAME=deck
|
||||||
- CORE_BRANCH=stable15
|
- CORE_BRANCH=stable15
|
||||||
@@ -43,7 +43,7 @@ pipeline:
|
|||||||
- DB=sqlite
|
- DB=sqlite
|
||||||
commands:
|
commands:
|
||||||
- composer install
|
- composer install
|
||||||
- ./vendor/bin/parallel-lint --exclude ./vendor/ .
|
- ./vendor/bin/parallel-lint --exclude ./vendor/ --exclude ./lib/Collaboration/ .
|
||||||
when:
|
when:
|
||||||
matrix:
|
matrix:
|
||||||
TESTS: syntax-php7.0
|
TESTS: syntax-php7.0
|
||||||
|
|||||||
@@ -154,6 +154,11 @@ class Application extends App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function registerCollaborationResources() {
|
protected function registerCollaborationResources() {
|
||||||
|
$version = \OC_Util::getVersion()[0];
|
||||||
|
if ($version < 16) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register Collaboration ResourceProvider
|
* Register Collaboration ResourceProvider
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ class BoardService {
|
|||||||
IGroupManager $groupManager,
|
IGroupManager $groupManager,
|
||||||
ActivityManager $activityManager,
|
ActivityManager $activityManager,
|
||||||
ChangeHelper $changeHelper,
|
ChangeHelper $changeHelper,
|
||||||
ResourceProvider $resourceProvider,
|
|
||||||
$userId
|
$userId
|
||||||
) {
|
) {
|
||||||
$this->boardMapper = $boardMapper;
|
$this->boardMapper = $boardMapper;
|
||||||
@@ -90,7 +89,6 @@ class BoardService {
|
|||||||
$this->groupManager = $groupManager;
|
$this->groupManager = $groupManager;
|
||||||
$this->activityManager = $activityManager;
|
$this->activityManager = $activityManager;
|
||||||
$this->changeHelper = $changeHelper;
|
$this->changeHelper = $changeHelper;
|
||||||
$this->resourceProvider = $resourceProvider;
|
|
||||||
$this->userId = $userId;
|
$this->userId = $userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,7 +461,13 @@ class BoardService {
|
|||||||
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_BOARD, $newAcl, ActivityManager::SUBJECT_BOARD_SHARE);
|
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_BOARD, $newAcl, ActivityManager::SUBJECT_BOARD_SHARE);
|
||||||
$this->boardMapper->mapAcl($newAcl);
|
$this->boardMapper->mapAcl($newAcl);
|
||||||
$this->changeHelper->boardChanged($boardId);
|
$this->changeHelper->boardChanged($boardId);
|
||||||
$this->resourceProvider->invalidateAccessCache($boardId);
|
$version = \OC_Util::getVersion()[0];
|
||||||
|
if ($version >= 16) {
|
||||||
|
try {
|
||||||
|
$resourceProvider = \OC::$server->query(\OCA\Deck\Collaboration\Resources\ResourceProvider::class);
|
||||||
|
$resourceProvider->invalidateAccessCache($boardId);
|
||||||
|
} catch (\Exception $e) {}
|
||||||
|
}
|
||||||
return $newAcl;
|
return $newAcl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -534,7 +538,13 @@ class BoardService {
|
|||||||
}
|
}
|
||||||
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_BOARD, $acl, ActivityManager::SUBJECT_BOARD_UNSHARE);
|
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_BOARD, $acl, ActivityManager::SUBJECT_BOARD_UNSHARE);
|
||||||
$this->changeHelper->boardChanged($acl->getBoardId());
|
$this->changeHelper->boardChanged($acl->getBoardId());
|
||||||
$this->resourceProvider->invalidateAccessCache($acl->getBoardId());
|
$version = \OC_Util::getVersion()[0];
|
||||||
|
if ($version >= 16) {
|
||||||
|
try {
|
||||||
|
$resourceProvider = \OC::$server->query(\OCA\Deck\Collaboration\Resources\ResourceProvider::class);
|
||||||
|
$resourceProvider->invalidateAccessCache($acl->getBoardId());
|
||||||
|
} catch (\Exception $e) {}
|
||||||
|
}
|
||||||
return $this->aclMapper->delete($acl);
|
return $this->aclMapper->delete($acl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user