Merge pull request #4522 from owncloud/update-reva-edge

[full-ci] update Reva to latest edge
This commit is contained in:
Michael Barz
2022-09-07 19:03:35 +02:00
committed by GitHub
4 changed files with 31 additions and 21 deletions
@@ -0,0 +1,5 @@
Enhancement: Update Reva
Update reva to latest edge.
https://github.com/owncloud/ocis/pull/4522
+1 -1
View File
@@ -11,7 +11,7 @@ require (
github.com/blevesearch/bleve_index_api v1.0.3
github.com/coreos/go-oidc/v3 v3.3.0
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d
github.com/cs3org/reva/v2 v2.8.1-0.20220831103032-f4dd66379b55
github.com/cs3org/reva/v2 v2.8.1-0.20220907105120-bb524f7a0ea1
github.com/disintegration/imaging v1.6.2
github.com/ggwhite/go-masker v1.0.9
github.com/go-chi/chi/v5 v5.0.7
+4
View File
@@ -296,6 +296,10 @@ github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d h1:toyZ7IsXlUdEP
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.8.1-0.20220831103032-f4dd66379b55 h1:1hR0P5aZEp/lQepOli1yYdWWwNClgBoCyLK3RARj4B8=
github.com/cs3org/reva/v2 v2.8.1-0.20220831103032-f4dd66379b55/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
github.com/cs3org/reva/v2 v2.8.1-0.20220906091658-53b778d9a468 h1:KlyfeKSkYpgY4+c2KrJj+TYXLEhcpJnH6VCHsyIdifk=
github.com/cs3org/reva/v2 v2.8.1-0.20220906091658-53b778d9a468/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
github.com/cs3org/reva/v2 v2.8.1-0.20220907105120-bb524f7a0ea1 h1:ar7HXIBnHU5obKLkLmzYjyLEfaIKLEKglQDllKAIVxY=
github.com/cs3org/reva/v2 v2.8.1-0.20220907105120-bb524f7a0ea1/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
@@ -480,7 +480,7 @@ class SpacesContext implements Context {
}
/**
* manager of the project space first disables and then deletes spaces
* the admin user first disables and then deletes spaces
*
* @return void
*
@@ -495,26 +495,26 @@ class SpacesContext implements Context {
$query
);
$drives = $this->getAvailableSpaces();
$createdUsers = $this->featureContext->getCreatedUsers();
foreach ($drives as $value) {
foreach ($value["root"]["permissions"] as $permissions) {
// find an user who is a manager
if ($permissions["roles"][0] === "manager") {
$userId = $permissions["grantedTo"][0]["user"]["id"];
foreach ($createdUsers as $user) {
if ($user["id"] === $userId) {
$userName = $user["actualUsername"];
if (!\array_key_exists("deleted", $value["root"])) {
$this->sendDisableSpaceRequest($userName, $value["name"]);
}
$this->sendDeleteSpaceRequest($userName, $value["name"]);
}
}
}
if (!\array_key_exists("deleted", $value["root"])) {
$this->featureContext->setResponse(
GraphHelper::disableSpace(
$this->featureContext->getBaseUrl(),
$userAdmin,
$this->featureContext->getPasswordForUser($userAdmin),
$value["id"]
)
);
}
$this->featureContext->setResponse(
GraphHelper::deleteSpace(
$this->featureContext->getBaseUrl(),
$userAdmin,
$this->featureContext->getPasswordForUser($userAdmin),
$value["id"]
)
);
}
}
@@ -528,6 +528,7 @@ class SpacesContext implements Context {
public function deleteAllPersonalSpaces(): void {
$query = "\$filter=driveType eq personal";
$createdUsers = $this->featureContext->getCreatedUsers();
$userAdmin = $this->featureContext->getAdminUsername();
foreach ($createdUsers as $user) {
$this->theUserListsAllHisAvailableSpacesUsingTheGraphApi(
@@ -537,9 +538,9 @@ class SpacesContext implements Context {
$drives = $this->getAvailableSpaces();
foreach ($drives as $value) {
if (!\array_key_exists("deleted", $value["root"])) {
$this->sendDisableSpaceRequest($user["actualUsername"], $value["name"]);
$this->sendDisableSpaceRequest($userAdmin, $value["name"]);
}
$this->sendDeleteSpaceRequest($user["actualUsername"], $value["name"]);
$this->sendDeleteSpaceRequest($userAdmin, $value["name"]);
}
}
}