details['message'] = $description; return $this; } public function setScopes(array $scopes): LogContext { $this->details['scopes'] = []; foreach ($scopes as $scope) { if ($scope instanceof ScopeContext) { switch ($scope->getScope()) { case IManager::SCOPE_ADMIN: $this->details['scopes'][] = ['scope' => 'admin']; break; case IManager::SCOPE_USER: $this->details['scopes'][] = [ 'scope' => 'user', 'uid' => $scope->getScopeId(), ]; break; default: continue 2; } } } return $this; } public function setOperation(?IOperation $operation): LogContext { if ($operation instanceof IOperation) { $this->details['operation'] = [ 'class' => get_class($operation), 'name' => $operation->getDisplayName(), ]; } return $this; } public function setEntity(?IEntity $entity): LogContext { if ($entity instanceof IEntity) { $this->details['entity'] = [ 'class' => get_class($entity), 'name' => $entity->getName(), ]; } return $this; } public function setConfiguration(array $configuration): LogContext { $this->details['configuration'] = $configuration; return $this; } public function setEventName(string $eventName): LogContext { $this->details['eventName'] = $eventName; return $this; } public function getDetails(): array { return $this->details; } } g-better-than-delete-and-unshare'>Jerome-Herbinet-better-new-wording-better-than-delete-and-unshare Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/AdvancedCapabilities.php
blob: 22f990f0cf822b52956cdbc342d1515fe1162f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38