aboutsummaryrefslogtreecommitdiffstats
path: root/.drone.yml
Commit message (Expand)AuthorAgeFilesLines
* ci: Migrate CalDAVTester CI scripts to GitHubFerdinand Thiessen2024-06-081-132/+0
* chore: Add SPDX headerAndy Scherzinger2024-05-131-1/+6
* chore(drone): Update drone file signatureAndy Scherzinger2024-04-081-1/+1
* ci(drone): use *-php8.3 imagesRichard Steinmetz2024-04-081-6/+6
* chore(CI): Sign .drone.ymlJoas Schilling2024-02-141-1/+1
* chore(CI): Migrate samba `files_external` tests from Drone to GitHubFerdinand Thiessen2024-02-141-40/+0
* chore: Sign .drone.yml configJoas Schilling2024-02-141-1/+1
* chore(CI): Migrate autocheckers from Drone to GitHubFerdinand Thiessen2024-02-141-23/+0
* Sign drone.ymlJoas Schilling2024-02-021-1/+1
* chore(ci): Migrate files-external webdav tests to GitHubFerdinand Thiessen2024-02-021-31/+0
* fix(CI): Sign .drone.ymlJoas Schilling2024-01-261-1/+1
* chore(tests): Migrate memcached unit test from drone to GitHub ActionFerdinand Thiessen2024-01-261-26/+0
* chore(tests): Migrate object storage unit tests from drone to GitHub ActionsFerdinand Thiessen2024-01-261-75/+0
* chore(tests): Migrate code coverage generation from drone to GitHubFerdinand Thiessen2024-01-261-64/+0
* chore(tests): Migrate `sqlite` tests from drone to GitHubFerdinand Thiessen2024-01-261-54/+0
* chore(tests): Migrate `postgres` tests from drone to GitHubFerdinand Thiessen2024-01-261-144/+0
* chore(tests): Migrate `mariadb` tests from drone to GitHubFerdinand Thiessen2024-01-261-114/+0
* chore(tests): Migrate MySQL database tests from drone to GitHubFerdinand Thiessen2024-01-261-39/+0
* chore: Move integration tests from drone to githubJoas Schilling2024-01-261-995/+1
* Update .drone.yml signatureJoas Schilling2023-12-061-1/+1
* chore(cypress): Migrate apps acceptance tests to CypressFerdinand Thiessen2023-11-061-30/+0
* chore(cypress): Migrate header contacts menu tests from Behat to CypressFerdinand Thiessen2023-11-051-30/+0
* Merge pull request #41137 from nextcloud/chore/migrate-access-level-cypressFerdinand Thiessen2023-11-021-30/+0
|\
| * chore(cypress): Migrate access-level tests from Behat to Cypress as this are ...Ferdinand Thiessen2023-10-291-30/+0
* | Talk now uses the "main" branchJoas Schilling2023-10-301-1/+1
|/
* fix(settings): Stablize user list cypress testsFerdinand Thiessen2023-10-251-30/+0
* chore(tests): Migrate login acceptance tests from behat to CypressFerdinand Thiessen2023-10-231-30/+0
* fix(CI): Update .drone.yml signatureJoas Schilling2023-08-301-1/+1
* chore: remove outdated acceptance testsJohn Molakvoæ2023-08-171-120/+0
* chore(CI): Sign .drone.yml fileJoas Schilling2023-07-131-0/+4
* chore(CI): Make it easier to find the right place in the futureJoas Schilling2023-03-031-2/+2
* fix(CI): Install composer dependencies of TalkJoas Schilling2023-01-271-1/+6
* Move all drone steps to PHP 8.0Côme Chilliet2023-01-201-87/+77
* Drop acceptance themingJohn Molakvoæ2022-11-291-30/+0
* Merge pull request #33631 from nextcloud/enh/noid/mariadb10.6-masterSimon L2022-11-151-1/+1
|\
| * use the updated mariadb10.6 container in droneszaimen2022-11-111-1/+1
* | Bugfix to support postgres15Vitor Mattos2022-11-111-3/+39
|/
* Run tests with MySQL/MariaDB ONLY_FULL_GROUP_BYJoas Schilling2022-03-211-1/+9
* Merge pull request #31011 from nextcloud/dronupdtJoas Schilling2022-02-111-17/+17
|\
| * Add Postgres10acsfer2022-02-071-0/+36
| * Remove PGsql 9.6 (EOL)acsfer2022-02-071-36/+0
| * Keep 10.4 to PHP8acsfer2022-02-061-2/+2
| * Update .drone.ymlacsfer2022-02-061-1/+1
| * Replace with 10.2acsfer2022-02-061-4/+4
| * Fix testsacsfer2022-02-051-2/+2
| * Typo fixacsfer2022-02-041-2/+2
| * Update droneacsfer2022-02-041-17/+17
* | Temporarily disable samba-non-native as it times out too oftenJoas Schilling2022-02-091-10/+11
|/
* Fix apache2 start command in .drone.ymlCôme Chilliet2022-01-251-1/+1
* Fix docker images sourceCôme Chilliet2022-01-251-10/+10
an class="p">(), 'files', 'quota', 'default'), 'storageLocation' => $user->getHome(), 'lastLogin' => $user->getLastLogin(), 'backend' => $user->getBackendClassName() ); } /** * @param array $userIDs * @return IUser[] */ private function getUsersForUID(array $userIDs) { $users = []; foreach ($userIDs as $uid => $displayName) { $users[] = $this->userManager->get($uid); } return $users; } /** * @NoAdminRequired * * @param int $offset * @param int $limit * @param string $gid GID to filter for * @param string $pattern Pattern to search for in the username * @param string $backend Backend to filter for (class-name) * @return DataResponse * * TODO: Tidy up and write unit tests - code is mainly static method calls */ public function index($offset = 0, $limit = 10, $gid = '', $pattern = '', $backend = '') { // FIXME: The JS sends the group '_everyone' instead of no GID for the "all users" group. if($gid === '_everyone') { $gid = ''; } // Remove backends if(!empty($backend)) { $activeBackends = $this->userManager->getBackends(); $this->userManager->clearBackends(); foreach($activeBackends as $singleActiveBackend) { if($backend === get_class($singleActiveBackend)) { $this->userManager->registerBackend($singleActiveBackend); break; } } } $users = array(); if ($this->isAdmin) { if($gid !== '') { $batch = $this->getUsersForUID($this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset)); } else { $batch = $this->userManager->search(''); } foreach ($batch as $user) { $users[] = $this->formatUserForIndex($user); } } else { if($gid !== '' && !in_array($gid, \OC_SubAdmin::getSubAdminsGroups($this->userSession->getUser()->getUID()))) { $gid = ''; } $batch = $this->getUsersForUID($this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset)); foreach ($batch as $user) { // Only add the groups, this user is a subadmin of $userGroups = array_intersect($this->groupManager->getUserGroupIds($user), \OC_SubAdmin::getSubAdminsGroups($this->userSession->getUser()->getUID())); $users[] = $this->formatUserForIndex($user, $userGroups); } } return new DataResponse($users); } /** * @NoAdminRequired * * @param string $username * @param string $password * @param array $groups * @return DataResponse * * TODO: Tidy up and write unit tests - code is mainly static method calls */ public function create($username, $password, array $groups) { if (!$this->isAdmin) { if (!empty($groups)) { foreach ($groups as $key => $group) { if (!\OC_SubAdmin::isGroupAccessible($this->userSession->getUser()->getUID(), $group)) { unset($groups[$key]); } } } if (empty($groups)) { $groups = \OC_SubAdmin::getSubAdminsGroups($this->userSession->getUser()->getUID()); } } try { $user = $this->userManager->createUser($username, $password); } catch (\Exception $exception) { return new DataResponse( array( 'message' => (string)$this->l10n->t('Unable to create user.') ), Http::STATUS_FORBIDDEN ); } if($user instanceof User) { foreach( $groups as $groupName ) { $group = $this->groupManager->get($groupName); if(empty($group)) { $group = $this->groupManager->createGroup($groupName); } $group->addUser($user); } } return new DataResponse( array( 'username' => $username, 'groups' => $this->groupManager->getUserGroupIds($user), 'storageLocation' => $user->getHome() ), Http::STATUS_CREATED ); } /** * @NoAdminRequired * * @param string $id * @return DataResponse * * TODO: Tidy up and write unit tests - code is mainly static method calls */ public function destroy($id) { if($this->userSession->getUser()->getUID() === $id) { return new DataResponse( array( 'status' => 'error', 'data' => array( 'message' => (string)$this->l10n->t('Unable to delete user.') ) ), Http::STATUS_FORBIDDEN ); } // FIXME: Remove this static function call at some point… if(!$this->isAdmin && !\OC_SubAdmin::isUserAccessible($this->userSession->getUser()->getUID(), $id)) { return new DataResponse( array( 'status' => 'error', 'data' => array( 'message' => (string)$this->l10n->t('Authentication error') ) ), Http::STATUS_FORBIDDEN ); } $user = $this->userManager->get($id); if($user) { if($user->delete()) { return new DataResponse( array( 'status' => 'success', 'data' => array( 'username' => $id ) ), Http::STATUS_NO_CONTENT ); } } return new DataResponse( array( 'status' => 'error', 'data' => array( 'message' => (string)$this->l10n->t('Unable to delete user.') ) ), Http::STATUS_FORBIDDEN ); } }