@@ -37,59 +37,59 @@ |
||
37 | 37 | |
38 | 38 | class ChunkCleanup implements IRepairStep { |
39 | 39 | |
40 | - /** @var IConfig */ |
|
41 | - private $config; |
|
42 | - /** @var IUserManager */ |
|
43 | - private $userManager; |
|
44 | - /** @var IRootFolder */ |
|
45 | - private $rootFolder; |
|
46 | - /** @var IJobList */ |
|
47 | - private $jobList; |
|
40 | + /** @var IConfig */ |
|
41 | + private $config; |
|
42 | + /** @var IUserManager */ |
|
43 | + private $userManager; |
|
44 | + /** @var IRootFolder */ |
|
45 | + private $rootFolder; |
|
46 | + /** @var IJobList */ |
|
47 | + private $jobList; |
|
48 | 48 | |
49 | - public function __construct(IConfig $config, |
|
50 | - IUserManager $userManager, |
|
51 | - IRootFolder $rootFolder, |
|
52 | - IJobList $jobList) { |
|
53 | - $this->config = $config; |
|
54 | - $this->userManager = $userManager; |
|
55 | - $this->rootFolder = $rootFolder; |
|
56 | - $this->jobList = $jobList; |
|
57 | - } |
|
49 | + public function __construct(IConfig $config, |
|
50 | + IUserManager $userManager, |
|
51 | + IRootFolder $rootFolder, |
|
52 | + IJobList $jobList) { |
|
53 | + $this->config = $config; |
|
54 | + $this->userManager = $userManager; |
|
55 | + $this->rootFolder = $rootFolder; |
|
56 | + $this->jobList = $jobList; |
|
57 | + } |
|
58 | 58 | |
59 | - public function getName(): string { |
|
60 | - return 'Chunk cleanup scheduler'; |
|
61 | - } |
|
59 | + public function getName(): string { |
|
60 | + return 'Chunk cleanup scheduler'; |
|
61 | + } |
|
62 | 62 | |
63 | - public function run(IOutput $output) { |
|
64 | - // If we already ran this onec there is no need to run it again |
|
65 | - if ($this->config->getAppValue('dav', 'chunks_migrated', '0') === '1') { |
|
66 | - $output->info('Cleanup not required'); |
|
67 | - } |
|
63 | + public function run(IOutput $output) { |
|
64 | + // If we already ran this onec there is no need to run it again |
|
65 | + if ($this->config->getAppValue('dav', 'chunks_migrated', '0') === '1') { |
|
66 | + $output->info('Cleanup not required'); |
|
67 | + } |
|
68 | 68 | |
69 | - $output->startProgress(); |
|
70 | - // Loop over all seen users |
|
71 | - $this->userManager->callForSeenUsers(function (IUser $user) use ($output) { |
|
72 | - try { |
|
73 | - $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
|
74 | - $userRoot = $userFolder->getParent(); |
|
75 | - /** @var Folder $uploadFolder */ |
|
76 | - $uploadFolder = $userRoot->get('uploads'); |
|
77 | - } catch (NotFoundException $e) { |
|
78 | - // No folder so skipping |
|
79 | - return; |
|
80 | - } |
|
69 | + $output->startProgress(); |
|
70 | + // Loop over all seen users |
|
71 | + $this->userManager->callForSeenUsers(function (IUser $user) use ($output) { |
|
72 | + try { |
|
73 | + $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
|
74 | + $userRoot = $userFolder->getParent(); |
|
75 | + /** @var Folder $uploadFolder */ |
|
76 | + $uploadFolder = $userRoot->get('uploads'); |
|
77 | + } catch (NotFoundException $e) { |
|
78 | + // No folder so skipping |
|
79 | + return; |
|
80 | + } |
|
81 | 81 | |
82 | - // Insert a cleanup job for each folder we find |
|
83 | - $uploads = $uploadFolder->getDirectoryListing(); |
|
84 | - foreach ($uploads as $upload) { |
|
85 | - $this->jobList->add(UploadCleanup::class, ['uid' => $user->getUID(), 'folder' => $upload->getName()]); |
|
86 | - } |
|
87 | - $output->advance(); |
|
88 | - }); |
|
89 | - $output->finishProgress(); |
|
82 | + // Insert a cleanup job for each folder we find |
|
83 | + $uploads = $uploadFolder->getDirectoryListing(); |
|
84 | + foreach ($uploads as $upload) { |
|
85 | + $this->jobList->add(UploadCleanup::class, ['uid' => $user->getUID(), 'folder' => $upload->getName()]); |
|
86 | + } |
|
87 | + $output->advance(); |
|
88 | + }); |
|
89 | + $output->finishProgress(); |
|
90 | 90 | |
91 | 91 | |
92 | - $this->config->setAppValue('dav', 'chunks_migrated', '1'); |
|
93 | - } |
|
92 | + $this->config->setAppValue('dav', 'chunks_migrated', '1'); |
|
93 | + } |
|
94 | 94 | |
95 | 95 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | $output->startProgress(); |
70 | 70 | // Loop over all seen users |
71 | - $this->userManager->callForSeenUsers(function (IUser $user) use ($output) { |
|
71 | + $this->userManager->callForSeenUsers(function(IUser $user) use ($output) { |
|
72 | 72 | try { |
73 | 73 | $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
74 | 74 | $userRoot = $userFolder->getParent(); |
@@ -6,39 +6,39 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitOAuth2 |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\OAuth2\\' => 11, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\OAuth2\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\OAuth2\\Controller\\LoginRedirectorController' => __DIR__ . '/..' . '/../lib/Controller/LoginRedirectorController.php', |
|
25 | - 'OCA\\OAuth2\\Controller\\OauthApiController' => __DIR__ . '/..' . '/../lib/Controller/OauthApiController.php', |
|
26 | - 'OCA\\OAuth2\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
27 | - 'OCA\\OAuth2\\Db\\AccessToken' => __DIR__ . '/..' . '/../lib/Db/AccessToken.php', |
|
28 | - 'OCA\\OAuth2\\Db\\AccessTokenMapper' => __DIR__ . '/..' . '/../lib/Db/AccessTokenMapper.php', |
|
29 | - 'OCA\\OAuth2\\Db\\Client' => __DIR__ . '/..' . '/../lib/Db/Client.php', |
|
30 | - 'OCA\\OAuth2\\Db\\ClientMapper' => __DIR__ . '/..' . '/../lib/Db/ClientMapper.php', |
|
31 | - 'OCA\\OAuth2\\Exceptions\\AccessTokenNotFoundException' => __DIR__ . '/..' . '/../lib/Exceptions/AccessTokenNotFoundException.php', |
|
32 | - 'OCA\\OAuth2\\Exceptions\\ClientNotFoundException' => __DIR__ . '/..' . '/../lib/Exceptions/ClientNotFoundException.php', |
|
33 | - 'OCA\\OAuth2\\Migration\\SetTokenExpiration' => __DIR__ . '/..' . '/../lib/Migration/SetTokenExpiration.php', |
|
34 | - 'OCA\\OAuth2\\Migration\\Version010401Date20181207190718' => __DIR__ . '/..' . '/../lib/Migration/Version010401Date20181207190718.php', |
|
35 | - 'OCA\\OAuth2\\Migration\\Version010402Date20190107124745' => __DIR__ . '/..' . '/../lib/Migration/Version010402Date20190107124745.php', |
|
36 | - 'OCA\\OAuth2\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\OAuth2\\Controller\\LoginRedirectorController' => __DIR__.'/..'.'/../lib/Controller/LoginRedirectorController.php', |
|
25 | + 'OCA\\OAuth2\\Controller\\OauthApiController' => __DIR__.'/..'.'/../lib/Controller/OauthApiController.php', |
|
26 | + 'OCA\\OAuth2\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
27 | + 'OCA\\OAuth2\\Db\\AccessToken' => __DIR__.'/..'.'/../lib/Db/AccessToken.php', |
|
28 | + 'OCA\\OAuth2\\Db\\AccessTokenMapper' => __DIR__.'/..'.'/../lib/Db/AccessTokenMapper.php', |
|
29 | + 'OCA\\OAuth2\\Db\\Client' => __DIR__.'/..'.'/../lib/Db/Client.php', |
|
30 | + 'OCA\\OAuth2\\Db\\ClientMapper' => __DIR__.'/..'.'/../lib/Db/ClientMapper.php', |
|
31 | + 'OCA\\OAuth2\\Exceptions\\AccessTokenNotFoundException' => __DIR__.'/..'.'/../lib/Exceptions/AccessTokenNotFoundException.php', |
|
32 | + 'OCA\\OAuth2\\Exceptions\\ClientNotFoundException' => __DIR__.'/..'.'/../lib/Exceptions/ClientNotFoundException.php', |
|
33 | + 'OCA\\OAuth2\\Migration\\SetTokenExpiration' => __DIR__.'/..'.'/../lib/Migration/SetTokenExpiration.php', |
|
34 | + 'OCA\\OAuth2\\Migration\\Version010401Date20181207190718' => __DIR__.'/..'.'/../lib/Migration/Version010401Date20181207190718.php', |
|
35 | + 'OCA\\OAuth2\\Migration\\Version010402Date20190107124745' => __DIR__.'/..'.'/../lib/Migration/Version010402Date20190107124745.php', |
|
36 | + 'OCA\\OAuth2\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | public static function getInitializer(ClassLoader $loader) |
40 | 40 | { |
41 | - return \Closure::bind(function () use ($loader) { |
|
41 | + return \Closure::bind(function() use ($loader) { |
|
42 | 42 | $loader->prefixLengthsPsr4 = ComposerStaticInitOAuth2::$prefixLengthsPsr4; |
43 | 43 | $loader->prefixDirsPsr4 = ComposerStaticInitOAuth2::$prefixDirsPsr4; |
44 | 44 | $loader->classMap = ComposerStaticInitOAuth2::$classMap; |
@@ -6,17 +6,17 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\OAuth2\\Controller\\LoginRedirectorController' => $baseDir . '/../lib/Controller/LoginRedirectorController.php', |
|
10 | - 'OCA\\OAuth2\\Controller\\OauthApiController' => $baseDir . '/../lib/Controller/OauthApiController.php', |
|
11 | - 'OCA\\OAuth2\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
12 | - 'OCA\\OAuth2\\Db\\AccessToken' => $baseDir . '/../lib/Db/AccessToken.php', |
|
13 | - 'OCA\\OAuth2\\Db\\AccessTokenMapper' => $baseDir . '/../lib/Db/AccessTokenMapper.php', |
|
14 | - 'OCA\\OAuth2\\Db\\Client' => $baseDir . '/../lib/Db/Client.php', |
|
15 | - 'OCA\\OAuth2\\Db\\ClientMapper' => $baseDir . '/../lib/Db/ClientMapper.php', |
|
16 | - 'OCA\\OAuth2\\Exceptions\\AccessTokenNotFoundException' => $baseDir . '/../lib/Exceptions/AccessTokenNotFoundException.php', |
|
17 | - 'OCA\\OAuth2\\Exceptions\\ClientNotFoundException' => $baseDir . '/../lib/Exceptions/ClientNotFoundException.php', |
|
18 | - 'OCA\\OAuth2\\Migration\\SetTokenExpiration' => $baseDir . '/../lib/Migration/SetTokenExpiration.php', |
|
19 | - 'OCA\\OAuth2\\Migration\\Version010401Date20181207190718' => $baseDir . '/../lib/Migration/Version010401Date20181207190718.php', |
|
20 | - 'OCA\\OAuth2\\Migration\\Version010402Date20190107124745' => $baseDir . '/../lib/Migration/Version010402Date20190107124745.php', |
|
21 | - 'OCA\\OAuth2\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
9 | + 'OCA\\OAuth2\\Controller\\LoginRedirectorController' => $baseDir.'/../lib/Controller/LoginRedirectorController.php', |
|
10 | + 'OCA\\OAuth2\\Controller\\OauthApiController' => $baseDir.'/../lib/Controller/OauthApiController.php', |
|
11 | + 'OCA\\OAuth2\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
12 | + 'OCA\\OAuth2\\Db\\AccessToken' => $baseDir.'/../lib/Db/AccessToken.php', |
|
13 | + 'OCA\\OAuth2\\Db\\AccessTokenMapper' => $baseDir.'/../lib/Db/AccessTokenMapper.php', |
|
14 | + 'OCA\\OAuth2\\Db\\Client' => $baseDir.'/../lib/Db/Client.php', |
|
15 | + 'OCA\\OAuth2\\Db\\ClientMapper' => $baseDir.'/../lib/Db/ClientMapper.php', |
|
16 | + 'OCA\\OAuth2\\Exceptions\\AccessTokenNotFoundException' => $baseDir.'/../lib/Exceptions/AccessTokenNotFoundException.php', |
|
17 | + 'OCA\\OAuth2\\Exceptions\\ClientNotFoundException' => $baseDir.'/../lib/Exceptions/ClientNotFoundException.php', |
|
18 | + 'OCA\\OAuth2\\Migration\\SetTokenExpiration' => $baseDir.'/../lib/Migration/SetTokenExpiration.php', |
|
19 | + 'OCA\\OAuth2\\Migration\\Version010401Date20181207190718' => $baseDir.'/../lib/Migration/Version010401Date20181207190718.php', |
|
20 | + 'OCA\\OAuth2\\Migration\\Version010402Date20190107124745' => $baseDir.'/../lib/Migration/Version010402Date20190107124745.php', |
|
21 | + 'OCA\\OAuth2\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
22 | 22 | ); |
@@ -31,19 +31,19 @@ |
||
31 | 31 | |
32 | 32 | class Version010402Date20190107124745 extends SimpleMigrationStep { |
33 | 33 | |
34 | - /** |
|
35 | - * @param IOutput $output |
|
36 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
37 | - * @param array $options |
|
38 | - * @return null|ISchemaWrapper |
|
39 | - */ |
|
40 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
41 | - /** @var ISchemaWrapper $schema */ |
|
42 | - $schema = $schemaClosure(); |
|
34 | + /** |
|
35 | + * @param IOutput $output |
|
36 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
37 | + * @param array $options |
|
38 | + * @return null|ISchemaWrapper |
|
39 | + */ |
|
40 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
41 | + /** @var ISchemaWrapper $schema */ |
|
42 | + $schema = $schemaClosure(); |
|
43 | 43 | |
44 | - $table = $schema->getTable('oauth2_clients'); |
|
45 | - $table->dropIndex('oauth2_client_id_idx'); |
|
46 | - $table->addUniqueIndex(['client_identifier'], 'oauth2_client_id_idx'); |
|
47 | - return $schema; |
|
48 | - } |
|
44 | + $table = $schema->getTable('oauth2_clients'); |
|
45 | + $table->dropIndex('oauth2_client_id_idx'); |
|
46 | + $table->addUniqueIndex(['client_identifier'], 'oauth2_client_id_idx'); |
|
47 | + return $schema; |
|
48 | + } |
|
49 | 49 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) |
79 | 79 | ->setParameter('type', 'calendar') |
80 | 80 | ->setParameter('calendar_id', $row['calendarid']) |
81 | - ->setParameter('event_uid', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '"') . '%'); |
|
81 | + ->setParameter('event_uid', '%'.$this->connection->escapeLikeParameter('{"id":"'.$row['uid'].'"').'%'); |
|
82 | 82 | $deletedEvents += $delete->execute(); |
83 | 83 | } |
84 | 84 | $result->closeCursor(); |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) |
109 | 109 | ->setParameter('type', 'calendar') |
110 | 110 | ->setParameter('calendar_id', $row['calendarid']) |
111 | - ->setParameter('event_uid', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '"') . '%') |
|
112 | - ->setParameter('filtered_name', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '","name":"Busy"') . '%'); |
|
111 | + ->setParameter('event_uid', '%'.$this->connection->escapeLikeParameter('{"id":"'.$row['uid'].'"').'%') |
|
112 | + ->setParameter('filtered_name', '%'.$this->connection->escapeLikeParameter('{"id":"'.$row['uid'].'","name":"Busy"').'%'); |
|
113 | 113 | $deletedEvents += $delete->execute(); |
114 | 114 | } |
115 | 115 | $result->closeCursor(); |
@@ -29,104 +29,104 @@ |
||
29 | 29 | |
30 | 30 | class RemoveClassifiedEventActivity implements IRepairStep { |
31 | 31 | |
32 | - /** @var IDBConnection */ |
|
33 | - private $connection; |
|
34 | - |
|
35 | - public function __construct(IDBConnection $connection) { |
|
36 | - $this->connection = $connection; |
|
37 | - } |
|
38 | - |
|
39 | - /** |
|
40 | - * @inheritdoc |
|
41 | - */ |
|
42 | - public function getName() { |
|
43 | - return 'Remove activity entries of private events'; |
|
44 | - } |
|
45 | - |
|
46 | - /** |
|
47 | - * @inheritdoc |
|
48 | - */ |
|
49 | - public function run(IOutput $output) { |
|
50 | - if (!$this->connection->tableExists('activity')) { |
|
51 | - return; |
|
52 | - } |
|
53 | - |
|
54 | - $deletedEvents = $this->removePrivateEventActivity(); |
|
55 | - $deletedEvents += $this->removeConfidentialUncensoredEventActivity(); |
|
56 | - |
|
57 | - $output->info("Removed $deletedEvents activity entries"); |
|
58 | - } |
|
59 | - |
|
60 | - protected function removePrivateEventActivity(): int { |
|
61 | - $deletedEvents = 0; |
|
62 | - |
|
63 | - $delete = $this->connection->getQueryBuilder(); |
|
64 | - $delete->delete('activity') |
|
65 | - ->where($delete->expr()->neq('affecteduser', $delete->createParameter('owner'))) |
|
66 | - ->andWhere($delete->expr()->eq('object_type', $delete->createParameter('type'))) |
|
67 | - ->andWhere($delete->expr()->eq('object_id', $delete->createParameter('calendar_id'))) |
|
68 | - ->andWhere($delete->expr()->like('subjectparams', $delete->createParameter('event_uid'))); |
|
69 | - |
|
70 | - $query = $this->connection->getQueryBuilder(); |
|
71 | - $query->select('c.principaluri', 'o.calendarid', 'o.uid') |
|
72 | - ->from('calendarobjects', 'o') |
|
73 | - ->leftJoin('o', 'calendars', 'c', $query->expr()->eq('c.id', 'o.calendarid')) |
|
74 | - ->where($query->expr()->eq('o.classification', $query->createNamedParameter(CalDavBackend::CLASSIFICATION_PRIVATE))); |
|
75 | - $result = $query->execute(); |
|
76 | - |
|
77 | - while ($row = $result->fetch()) { |
|
78 | - if ($row['principaluri'] === null) { |
|
79 | - continue; |
|
80 | - } |
|
81 | - |
|
82 | - $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) |
|
83 | - ->setParameter('type', 'calendar') |
|
84 | - ->setParameter('calendar_id', $row['calendarid']) |
|
85 | - ->setParameter('event_uid', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '"') . '%'); |
|
86 | - $deletedEvents += $delete->execute(); |
|
87 | - } |
|
88 | - $result->closeCursor(); |
|
89 | - |
|
90 | - return $deletedEvents; |
|
91 | - } |
|
92 | - |
|
93 | - protected function removeConfidentialUncensoredEventActivity(): int { |
|
94 | - $deletedEvents = 0; |
|
95 | - |
|
96 | - $delete = $this->connection->getQueryBuilder(); |
|
97 | - $delete->delete('activity') |
|
98 | - ->where($delete->expr()->neq('affecteduser', $delete->createParameter('owner'))) |
|
99 | - ->andWhere($delete->expr()->eq('object_type', $delete->createParameter('type'))) |
|
100 | - ->andWhere($delete->expr()->eq('object_id', $delete->createParameter('calendar_id'))) |
|
101 | - ->andWhere($delete->expr()->like('subjectparams', $delete->createParameter('event_uid'))) |
|
102 | - ->andWhere($delete->expr()->notLike('subjectparams', $delete->createParameter('filtered_name'))); |
|
103 | - |
|
104 | - $query = $this->connection->getQueryBuilder(); |
|
105 | - $query->select('c.principaluri', 'o.calendarid', 'o.uid') |
|
106 | - ->from('calendarobjects', 'o') |
|
107 | - ->leftJoin('o', 'calendars', 'c', $query->expr()->eq('c.id', 'o.calendarid')) |
|
108 | - ->where($query->expr()->eq('o.classification', $query->createNamedParameter(CalDavBackend::CLASSIFICATION_CONFIDENTIAL))); |
|
109 | - $result = $query->execute(); |
|
110 | - |
|
111 | - while ($row = $result->fetch()) { |
|
112 | - if ($row['principaluri'] === null) { |
|
113 | - continue; |
|
114 | - } |
|
115 | - |
|
116 | - $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) |
|
117 | - ->setParameter('type', 'calendar') |
|
118 | - ->setParameter('calendar_id', $row['calendarid']) |
|
119 | - ->setParameter('event_uid', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '"') . '%') |
|
120 | - ->setParameter('filtered_name', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '","name":"Busy"') . '%'); |
|
121 | - $deletedEvents += $delete->execute(); |
|
122 | - } |
|
123 | - $result->closeCursor(); |
|
124 | - |
|
125 | - return $deletedEvents; |
|
126 | - } |
|
127 | - |
|
128 | - protected function getPrincipal(string $principalUri): string { |
|
129 | - $uri = explode('/', $principalUri); |
|
130 | - return array_pop($uri); |
|
131 | - } |
|
32 | + /** @var IDBConnection */ |
|
33 | + private $connection; |
|
34 | + |
|
35 | + public function __construct(IDBConnection $connection) { |
|
36 | + $this->connection = $connection; |
|
37 | + } |
|
38 | + |
|
39 | + /** |
|
40 | + * @inheritdoc |
|
41 | + */ |
|
42 | + public function getName() { |
|
43 | + return 'Remove activity entries of private events'; |
|
44 | + } |
|
45 | + |
|
46 | + /** |
|
47 | + * @inheritdoc |
|
48 | + */ |
|
49 | + public function run(IOutput $output) { |
|
50 | + if (!$this->connection->tableExists('activity')) { |
|
51 | + return; |
|
52 | + } |
|
53 | + |
|
54 | + $deletedEvents = $this->removePrivateEventActivity(); |
|
55 | + $deletedEvents += $this->removeConfidentialUncensoredEventActivity(); |
|
56 | + |
|
57 | + $output->info("Removed $deletedEvents activity entries"); |
|
58 | + } |
|
59 | + |
|
60 | + protected function removePrivateEventActivity(): int { |
|
61 | + $deletedEvents = 0; |
|
62 | + |
|
63 | + $delete = $this->connection->getQueryBuilder(); |
|
64 | + $delete->delete('activity') |
|
65 | + ->where($delete->expr()->neq('affecteduser', $delete->createParameter('owner'))) |
|
66 | + ->andWhere($delete->expr()->eq('object_type', $delete->createParameter('type'))) |
|
67 | + ->andWhere($delete->expr()->eq('object_id', $delete->createParameter('calendar_id'))) |
|
68 | + ->andWhere($delete->expr()->like('subjectparams', $delete->createParameter('event_uid'))); |
|
69 | + |
|
70 | + $query = $this->connection->getQueryBuilder(); |
|
71 | + $query->select('c.principaluri', 'o.calendarid', 'o.uid') |
|
72 | + ->from('calendarobjects', 'o') |
|
73 | + ->leftJoin('o', 'calendars', 'c', $query->expr()->eq('c.id', 'o.calendarid')) |
|
74 | + ->where($query->expr()->eq('o.classification', $query->createNamedParameter(CalDavBackend::CLASSIFICATION_PRIVATE))); |
|
75 | + $result = $query->execute(); |
|
76 | + |
|
77 | + while ($row = $result->fetch()) { |
|
78 | + if ($row['principaluri'] === null) { |
|
79 | + continue; |
|
80 | + } |
|
81 | + |
|
82 | + $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) |
|
83 | + ->setParameter('type', 'calendar') |
|
84 | + ->setParameter('calendar_id', $row['calendarid']) |
|
85 | + ->setParameter('event_uid', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '"') . '%'); |
|
86 | + $deletedEvents += $delete->execute(); |
|
87 | + } |
|
88 | + $result->closeCursor(); |
|
89 | + |
|
90 | + return $deletedEvents; |
|
91 | + } |
|
92 | + |
|
93 | + protected function removeConfidentialUncensoredEventActivity(): int { |
|
94 | + $deletedEvents = 0; |
|
95 | + |
|
96 | + $delete = $this->connection->getQueryBuilder(); |
|
97 | + $delete->delete('activity') |
|
98 | + ->where($delete->expr()->neq('affecteduser', $delete->createParameter('owner'))) |
|
99 | + ->andWhere($delete->expr()->eq('object_type', $delete->createParameter('type'))) |
|
100 | + ->andWhere($delete->expr()->eq('object_id', $delete->createParameter('calendar_id'))) |
|
101 | + ->andWhere($delete->expr()->like('subjectparams', $delete->createParameter('event_uid'))) |
|
102 | + ->andWhere($delete->expr()->notLike('subjectparams', $delete->createParameter('filtered_name'))); |
|
103 | + |
|
104 | + $query = $this->connection->getQueryBuilder(); |
|
105 | + $query->select('c.principaluri', 'o.calendarid', 'o.uid') |
|
106 | + ->from('calendarobjects', 'o') |
|
107 | + ->leftJoin('o', 'calendars', 'c', $query->expr()->eq('c.id', 'o.calendarid')) |
|
108 | + ->where($query->expr()->eq('o.classification', $query->createNamedParameter(CalDavBackend::CLASSIFICATION_CONFIDENTIAL))); |
|
109 | + $result = $query->execute(); |
|
110 | + |
|
111 | + while ($row = $result->fetch()) { |
|
112 | + if ($row['principaluri'] === null) { |
|
113 | + continue; |
|
114 | + } |
|
115 | + |
|
116 | + $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) |
|
117 | + ->setParameter('type', 'calendar') |
|
118 | + ->setParameter('calendar_id', $row['calendarid']) |
|
119 | + ->setParameter('event_uid', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '"') . '%') |
|
120 | + ->setParameter('filtered_name', '%' . $this->connection->escapeLikeParameter('{"id":"' . $row['uid'] . '","name":"Busy"') . '%'); |
|
121 | + $deletedEvents += $delete->execute(); |
|
122 | + } |
|
123 | + $result->closeCursor(); |
|
124 | + |
|
125 | + return $deletedEvents; |
|
126 | + } |
|
127 | + |
|
128 | + protected function getPrincipal(string $principalUri): string { |
|
129 | + $uri = explode('/', $principalUri); |
|
130 | + return array_pop($uri); |
|
131 | + } |
|
132 | 132 | } |
@@ -25,11 +25,11 @@ |
||
25 | 25 | use OpenStack\Identity\v2\Service; |
26 | 26 | |
27 | 27 | class SwiftV2CachingAuthService extends Service { |
28 | - public function authenticate(array $options = []): array { |
|
29 | - if (!empty($options['v2cachedToken'])) { |
|
30 | - return [$options['v2cachedToken'], $options['v2serviceUrl']]; |
|
31 | - } else { |
|
32 | - return parent::authenticate($options); |
|
33 | - } |
|
34 | - } |
|
28 | + public function authenticate(array $options = []): array { |
|
29 | + if (!empty($options['v2cachedToken'])) { |
|
30 | + return [$options['v2cachedToken'], $options['v2serviceUrl']]; |
|
31 | + } else { |
|
32 | + return parent::authenticate($options); |
|
33 | + } |
|
34 | + } |
|
35 | 35 | } |
@@ -33,43 +33,43 @@ |
||
33 | 33 | */ |
34 | 34 | interface IObjectStore { |
35 | 35 | |
36 | - /** |
|
37 | - * @return string the container or bucket name where objects are stored |
|
38 | - * @since 7.0.0 |
|
39 | - */ |
|
40 | - public function getStorageId(); |
|
36 | + /** |
|
37 | + * @return string the container or bucket name where objects are stored |
|
38 | + * @since 7.0.0 |
|
39 | + */ |
|
40 | + public function getStorageId(); |
|
41 | 41 | |
42 | - /** |
|
43 | - * @param string $urn the unified resource name used to identify the object |
|
44 | - * @return resource stream with the read data |
|
45 | - * @throws \Exception when something goes wrong, message will be logged |
|
46 | - * @throws NotFoundException if file does not exist |
|
47 | - * @since 7.0.0 |
|
48 | - */ |
|
49 | - public function readObject($urn); |
|
42 | + /** |
|
43 | + * @param string $urn the unified resource name used to identify the object |
|
44 | + * @return resource stream with the read data |
|
45 | + * @throws \Exception when something goes wrong, message will be logged |
|
46 | + * @throws NotFoundException if file does not exist |
|
47 | + * @since 7.0.0 |
|
48 | + */ |
|
49 | + public function readObject($urn); |
|
50 | 50 | |
51 | - /** |
|
52 | - * @param string $urn the unified resource name used to identify the object |
|
53 | - * @param resource $stream stream with the data to write |
|
54 | - * @throws \Exception when something goes wrong, message will be logged |
|
55 | - * @since 7.0.0 |
|
56 | - */ |
|
57 | - public function writeObject($urn, $stream); |
|
51 | + /** |
|
52 | + * @param string $urn the unified resource name used to identify the object |
|
53 | + * @param resource $stream stream with the data to write |
|
54 | + * @throws \Exception when something goes wrong, message will be logged |
|
55 | + * @since 7.0.0 |
|
56 | + */ |
|
57 | + public function writeObject($urn, $stream); |
|
58 | 58 | |
59 | - /** |
|
60 | - * @param string $urn the unified resource name used to identify the object |
|
61 | - * @return void |
|
62 | - * @throws \Exception when something goes wrong, message will be logged |
|
63 | - * @since 7.0.0 |
|
64 | - */ |
|
65 | - public function deleteObject($urn); |
|
59 | + /** |
|
60 | + * @param string $urn the unified resource name used to identify the object |
|
61 | + * @return void |
|
62 | + * @throws \Exception when something goes wrong, message will be logged |
|
63 | + * @since 7.0.0 |
|
64 | + */ |
|
65 | + public function deleteObject($urn); |
|
66 | 66 | |
67 | - /** |
|
68 | - * Check if an object exists in the object store |
|
69 | - * |
|
70 | - * @param string $urn |
|
71 | - * @return bool |
|
72 | - * @since 16.0.0 |
|
73 | - */ |
|
74 | - public function objectExists($urn); |
|
67 | + /** |
|
68 | + * Check if an object exists in the object store |
|
69 | + * |
|
70 | + * @param string $urn |
|
71 | + * @return bool |
|
72 | + * @since 16.0.0 |
|
73 | + */ |
|
74 | + public function objectExists($urn); |
|
75 | 75 | } |
@@ -34,141 +34,141 @@ |
||
34 | 34 | * @since 6.0.0 |
35 | 35 | */ |
36 | 36 | interface IManager { |
37 | - /** |
|
38 | - * Generates a new IEvent object |
|
39 | - * |
|
40 | - * Make sure to call at least the following methods before sending it to the |
|
41 | - * app with via the publish() method: |
|
42 | - * - setApp() |
|
43 | - * - setType() |
|
44 | - * - setAffectedUser() |
|
45 | - * - setSubject() |
|
46 | - * |
|
47 | - * @return IEvent |
|
48 | - * @since 8.2.0 |
|
49 | - */ |
|
50 | - public function generateEvent(): IEvent; |
|
51 | - |
|
52 | - /** |
|
53 | - * Publish an event to the activity consumers |
|
54 | - * |
|
55 | - * Make sure to call at least the following methods before sending an Event: |
|
56 | - * - setApp() |
|
57 | - * - setType() |
|
58 | - * - setAffectedUser() |
|
59 | - * - setSubject() |
|
60 | - * |
|
61 | - * @param IEvent $event |
|
62 | - * @throws \BadMethodCallException if required values have not been set |
|
63 | - * @since 8.2.0 |
|
64 | - */ |
|
65 | - public function publish(IEvent $event): void; |
|
66 | - |
|
67 | - /** |
|
68 | - * In order to improve lazy loading a closure can be registered which will be called in case |
|
69 | - * activity consumers are actually requested |
|
70 | - * |
|
71 | - * $callable has to return an instance of \OCP\Activity\IConsumer |
|
72 | - * |
|
73 | - * @param \Closure $callable |
|
74 | - * @since 6.0.0 |
|
75 | - */ |
|
76 | - public function registerConsumer(\Closure $callable): void; |
|
77 | - |
|
78 | - /** |
|
79 | - * @param string $filter Class must implement OCA\Activity\IFilter |
|
80 | - * @since 11.0.0 |
|
81 | - */ |
|
82 | - public function registerFilter(string $filter): void; |
|
83 | - |
|
84 | - /** |
|
85 | - * @return IFilter[] |
|
86 | - * @since 11.0.0 |
|
87 | - */ |
|
88 | - public function getFilters(): array; |
|
89 | - |
|
90 | - /** |
|
91 | - * @param string $id |
|
92 | - * @return IFilter |
|
93 | - * @throws \InvalidArgumentException when the filter was not found |
|
94 | - * @since 11.0.0 |
|
95 | - */ |
|
96 | - public function getFilterById(string $id): IFilter; |
|
97 | - |
|
98 | - /** |
|
99 | - * @param string $setting Class must implement OCA\Activity\ISetting |
|
100 | - * @since 11.0.0 |
|
101 | - */ |
|
102 | - public function registerSetting(string $setting): void; |
|
103 | - |
|
104 | - /** |
|
105 | - * @return ISetting[] |
|
106 | - * @since 11.0.0 |
|
107 | - */ |
|
108 | - public function getSettings(): array; |
|
109 | - |
|
110 | - /** |
|
111 | - * @param string $provider Class must implement OCA\Activity\IProvider |
|
112 | - * @since 11.0.0 |
|
113 | - */ |
|
114 | - public function registerProvider(string $provider): void; |
|
115 | - |
|
116 | - /** |
|
117 | - * @return IProvider[] |
|
118 | - * @since 11.0.0 |
|
119 | - */ |
|
120 | - public function getProviders(): array; |
|
121 | - |
|
122 | - /** |
|
123 | - * @param string $id |
|
124 | - * @return ISetting |
|
125 | - * @throws \InvalidArgumentException when the setting was not found |
|
126 | - * @since 11.0.0 |
|
127 | - */ |
|
128 | - public function getSettingById(string $id): ISetting; |
|
129 | - |
|
130 | - /** |
|
131 | - * @param string $type |
|
132 | - * @param int $id |
|
133 | - * @since 8.2.0 |
|
134 | - */ |
|
135 | - public function setFormattingObject(string $type, int $id): void; |
|
136 | - |
|
137 | - /** |
|
138 | - * @return bool |
|
139 | - * @since 8.2.0 |
|
140 | - */ |
|
141 | - public function isFormattingFilteredObject(): bool; |
|
142 | - |
|
143 | - /** |
|
144 | - * @param bool $status Set to true, when parsing events should not use SVG icons |
|
145 | - * @since 12.0.1 |
|
146 | - */ |
|
147 | - public function setRequirePNG(bool $status): void; |
|
148 | - |
|
149 | - /** |
|
150 | - * @return bool |
|
151 | - * @since 12.0.1 |
|
152 | - */ |
|
153 | - public function getRequirePNG(): bool; |
|
154 | - |
|
155 | - /** |
|
156 | - * Set the user we need to use |
|
157 | - * |
|
158 | - * @param string|null $currentUserId |
|
159 | - * @throws \UnexpectedValueException If the user is invalid |
|
160 | - * @since 9.0.1 |
|
161 | - */ |
|
162 | - public function setCurrentUserId(string $currentUserId = null): void; |
|
163 | - |
|
164 | - /** |
|
165 | - * Get the user we need to use |
|
166 | - * |
|
167 | - * Either the user is logged in, or we try to get it from the token |
|
168 | - * |
|
169 | - * @return string |
|
170 | - * @throws \UnexpectedValueException If the token is invalid, does not exist or is not unique |
|
171 | - * @since 8.1.0 |
|
172 | - */ |
|
173 | - public function getCurrentUserId(): string; |
|
37 | + /** |
|
38 | + * Generates a new IEvent object |
|
39 | + * |
|
40 | + * Make sure to call at least the following methods before sending it to the |
|
41 | + * app with via the publish() method: |
|
42 | + * - setApp() |
|
43 | + * - setType() |
|
44 | + * - setAffectedUser() |
|
45 | + * - setSubject() |
|
46 | + * |
|
47 | + * @return IEvent |
|
48 | + * @since 8.2.0 |
|
49 | + */ |
|
50 | + public function generateEvent(): IEvent; |
|
51 | + |
|
52 | + /** |
|
53 | + * Publish an event to the activity consumers |
|
54 | + * |
|
55 | + * Make sure to call at least the following methods before sending an Event: |
|
56 | + * - setApp() |
|
57 | + * - setType() |
|
58 | + * - setAffectedUser() |
|
59 | + * - setSubject() |
|
60 | + * |
|
61 | + * @param IEvent $event |
|
62 | + * @throws \BadMethodCallException if required values have not been set |
|
63 | + * @since 8.2.0 |
|
64 | + */ |
|
65 | + public function publish(IEvent $event): void; |
|
66 | + |
|
67 | + /** |
|
68 | + * In order to improve lazy loading a closure can be registered which will be called in case |
|
69 | + * activity consumers are actually requested |
|
70 | + * |
|
71 | + * $callable has to return an instance of \OCP\Activity\IConsumer |
|
72 | + * |
|
73 | + * @param \Closure $callable |
|
74 | + * @since 6.0.0 |
|
75 | + */ |
|
76 | + public function registerConsumer(\Closure $callable): void; |
|
77 | + |
|
78 | + /** |
|
79 | + * @param string $filter Class must implement OCA\Activity\IFilter |
|
80 | + * @since 11.0.0 |
|
81 | + */ |
|
82 | + public function registerFilter(string $filter): void; |
|
83 | + |
|
84 | + /** |
|
85 | + * @return IFilter[] |
|
86 | + * @since 11.0.0 |
|
87 | + */ |
|
88 | + public function getFilters(): array; |
|
89 | + |
|
90 | + /** |
|
91 | + * @param string $id |
|
92 | + * @return IFilter |
|
93 | + * @throws \InvalidArgumentException when the filter was not found |
|
94 | + * @since 11.0.0 |
|
95 | + */ |
|
96 | + public function getFilterById(string $id): IFilter; |
|
97 | + |
|
98 | + /** |
|
99 | + * @param string $setting Class must implement OCA\Activity\ISetting |
|
100 | + * @since 11.0.0 |
|
101 | + */ |
|
102 | + public function registerSetting(string $setting): void; |
|
103 | + |
|
104 | + /** |
|
105 | + * @return ISetting[] |
|
106 | + * @since 11.0.0 |
|
107 | + */ |
|
108 | + public function getSettings(): array; |
|
109 | + |
|
110 | + /** |
|
111 | + * @param string $provider Class must implement OCA\Activity\IProvider |
|
112 | + * @since 11.0.0 |
|
113 | + */ |
|
114 | + public function registerProvider(string $provider): void; |
|
115 | + |
|
116 | + /** |
|
117 | + * @return IProvider[] |
|
118 | + * @since 11.0.0 |
|
119 | + */ |
|
120 | + public function getProviders(): array; |
|
121 | + |
|
122 | + /** |
|
123 | + * @param string $id |
|
124 | + * @return ISetting |
|
125 | + * @throws \InvalidArgumentException when the setting was not found |
|
126 | + * @since 11.0.0 |
|
127 | + */ |
|
128 | + public function getSettingById(string $id): ISetting; |
|
129 | + |
|
130 | + /** |
|
131 | + * @param string $type |
|
132 | + * @param int $id |
|
133 | + * @since 8.2.0 |
|
134 | + */ |
|
135 | + public function setFormattingObject(string $type, int $id): void; |
|
136 | + |
|
137 | + /** |
|
138 | + * @return bool |
|
139 | + * @since 8.2.0 |
|
140 | + */ |
|
141 | + public function isFormattingFilteredObject(): bool; |
|
142 | + |
|
143 | + /** |
|
144 | + * @param bool $status Set to true, when parsing events should not use SVG icons |
|
145 | + * @since 12.0.1 |
|
146 | + */ |
|
147 | + public function setRequirePNG(bool $status): void; |
|
148 | + |
|
149 | + /** |
|
150 | + * @return bool |
|
151 | + * @since 12.0.1 |
|
152 | + */ |
|
153 | + public function getRequirePNG(): bool; |
|
154 | + |
|
155 | + /** |
|
156 | + * Set the user we need to use |
|
157 | + * |
|
158 | + * @param string|null $currentUserId |
|
159 | + * @throws \UnexpectedValueException If the user is invalid |
|
160 | + * @since 9.0.1 |
|
161 | + */ |
|
162 | + public function setCurrentUserId(string $currentUserId = null): void; |
|
163 | + |
|
164 | + /** |
|
165 | + * Get the user we need to use |
|
166 | + * |
|
167 | + * Either the user is logged in, or we try to get it from the token |
|
168 | + * |
|
169 | + * @return string |
|
170 | + * @throws \UnexpectedValueException If the token is invalid, does not exist or is not unique |
|
171 | + * @since 8.1.0 |
|
172 | + */ |
|
173 | + public function getCurrentUserId(): string; |
|
174 | 174 | } |
@@ -32,68 +32,68 @@ |
||
32 | 32 | */ |
33 | 33 | interface ISubAdmin { |
34 | 34 | |
35 | - /** |
|
36 | - * add a SubAdmin |
|
37 | - * @param IUser $user user to be SubAdmin |
|
38 | - * @param IGroup $group group $user becomes subadmin of |
|
39 | - * |
|
40 | - * @since 16.0.0 |
|
41 | - */ |
|
42 | - public function createSubAdmin(IUser $user, IGroup $group): void; |
|
35 | + /** |
|
36 | + * add a SubAdmin |
|
37 | + * @param IUser $user user to be SubAdmin |
|
38 | + * @param IGroup $group group $user becomes subadmin of |
|
39 | + * |
|
40 | + * @since 16.0.0 |
|
41 | + */ |
|
42 | + public function createSubAdmin(IUser $user, IGroup $group): void; |
|
43 | 43 | |
44 | - /** |
|
45 | - * delete a SubAdmin |
|
46 | - * @param IUser $user the user that is the SubAdmin |
|
47 | - * @param IGroup $group the group |
|
48 | - * |
|
49 | - * @since 16.0.0 |
|
50 | - */ |
|
51 | - public function deleteSubAdmin(IUser $user, IGroup $group): void; |
|
44 | + /** |
|
45 | + * delete a SubAdmin |
|
46 | + * @param IUser $user the user that is the SubAdmin |
|
47 | + * @param IGroup $group the group |
|
48 | + * |
|
49 | + * @since 16.0.0 |
|
50 | + */ |
|
51 | + public function deleteSubAdmin(IUser $user, IGroup $group): void; |
|
52 | 52 | |
53 | - /** |
|
54 | - * get groups of a SubAdmin |
|
55 | - * @param IUser $user the SubAdmin |
|
56 | - * @return IGroup[] |
|
57 | - * |
|
58 | - * @since 16.0.0 |
|
59 | - */ |
|
60 | - public function getSubAdminsGroups(IUser $user): array; |
|
53 | + /** |
|
54 | + * get groups of a SubAdmin |
|
55 | + * @param IUser $user the SubAdmin |
|
56 | + * @return IGroup[] |
|
57 | + * |
|
58 | + * @since 16.0.0 |
|
59 | + */ |
|
60 | + public function getSubAdminsGroups(IUser $user): array; |
|
61 | 61 | |
62 | - /** |
|
63 | - * get SubAdmins of a group |
|
64 | - * @param IGroup $group the group |
|
65 | - * @return IUser[] |
|
66 | - * |
|
67 | - * @since 16.0.0 |
|
68 | - */ |
|
69 | - public function getGroupsSubAdmins(IGroup $group): array; |
|
62 | + /** |
|
63 | + * get SubAdmins of a group |
|
64 | + * @param IGroup $group the group |
|
65 | + * @return IUser[] |
|
66 | + * |
|
67 | + * @since 16.0.0 |
|
68 | + */ |
|
69 | + public function getGroupsSubAdmins(IGroup $group): array; |
|
70 | 70 | |
71 | - /** |
|
72 | - * checks if a user is a SubAdmin of a group |
|
73 | - * @param IUser $user |
|
74 | - * @param IGroup $group |
|
75 | - * @return bool |
|
76 | - * |
|
77 | - * @since 16.0.0 |
|
78 | - */ |
|
79 | - public function isSubAdminOfGroup(IUser $user, IGroup $group): bool; |
|
71 | + /** |
|
72 | + * checks if a user is a SubAdmin of a group |
|
73 | + * @param IUser $user |
|
74 | + * @param IGroup $group |
|
75 | + * @return bool |
|
76 | + * |
|
77 | + * @since 16.0.0 |
|
78 | + */ |
|
79 | + public function isSubAdminOfGroup(IUser $user, IGroup $group): bool; |
|
80 | 80 | |
81 | - /** |
|
82 | - * checks if a user is a SubAdmin |
|
83 | - * @param IUser $user |
|
84 | - * @return bool |
|
85 | - * |
|
86 | - * @since 16.0.0 |
|
87 | - */ |
|
88 | - public function isSubAdmin(IUser $user): bool; |
|
81 | + /** |
|
82 | + * checks if a user is a SubAdmin |
|
83 | + * @param IUser $user |
|
84 | + * @return bool |
|
85 | + * |
|
86 | + * @since 16.0.0 |
|
87 | + */ |
|
88 | + public function isSubAdmin(IUser $user): bool; |
|
89 | 89 | |
90 | - /** |
|
91 | - * checks if a user is a accessible by a subadmin |
|
92 | - * @param IUser $subadmin |
|
93 | - * @param IUser $user |
|
94 | - * @return bool |
|
95 | - * |
|
96 | - * @since 16.0.0 |
|
97 | - */ |
|
98 | - public function isUserAccessible(IUser $subadmin, IUser $user): bool; |
|
90 | + /** |
|
91 | + * checks if a user is a accessible by a subadmin |
|
92 | + * @param IUser $subadmin |
|
93 | + * @param IUser $user |
|
94 | + * @return bool |
|
95 | + * |
|
96 | + * @since 16.0.0 |
|
97 | + */ |
|
98 | + public function isUserAccessible(IUser $subadmin, IUser $user): bool; |
|
99 | 99 | } |