Commit Graph

282 Commits

Author SHA1 Message Date
Thomas Müller 96b223676d Don't play with config values ... 2015-03-11 15:47:24 +01:00
Thomas Müller cba3ec2c7f Setting oci as supported database 2015-03-11 14:29:22 +01:00
Joas Schilling b1ff21ee28 Add a console command user:add to create users over the console 2015-03-11 14:22:23 +01:00
Morris Jobke ad97ceb787 Merge pull request #13513 from owncloud/repair-legacystoragenofatalfail
Do not abort when meeting unfixable legacy storages
2015-03-11 13:32:33 +01:00
Thomas Müller b3bb65eae5 Merge pull request #14662 from owncloud/issue/14661-show-versions-in-occ-applist
Add an option to include the installed app version in "occ app:list"
2015-03-11 12:23:22 +01:00
Joas Schilling 560137ca23 Always include the installed app version in "occ app:list" 2015-03-11 09:47:41 +01:00
Thomas Müller 6c1a1234f8 Properly handle available databases at runtime and respect setup checks in command line as well 2015-03-11 09:27:12 +01:00
Christian Kampka 83e0f84fef Allow configuring background job mode from the console 2015-03-02 20:51:40 +01:00
Vincent Petry 22bc37cb82 Properly forward repair errors and warnings
This makes repair errors and warnings visible for the user when
upgrading on the command line or in the web UI.
2015-02-27 12:44:04 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Thomas Müller 58cedc07b5 print app upgrade information to console as well 2015-02-24 12:52:16 +01:00
Thomas Müller bbf7f56f94 3rd-party apps are disabled on upgrade - refs #14026 2015-02-24 12:02:36 +01:00
Thomas Müller eae6471105 Fix error handling 2015-02-23 17:46:08 +01:00
Thomas Müller bcd10d3dc5 implement command maintenance:install 2015-02-23 16:47:47 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Thomas Müller d74662df7d implement php code checker to detect usage of not allowed private APIs - including console command to check local code to be used by developers 2015-02-10 11:51:24 +01:00
Morris Jobke a7eedf0149 Disallow disabling of files app 2015-02-03 00:39:01 +01:00
Thomas Müller 9ad9d7bfbb naming fixes while reviewing 2015-01-26 12:59:25 +01:00
Joas Schilling 039397bd31 Use setConfigs() instead of calling setConfig() multiple times 2015-01-23 14:52:21 +01:00
Thomas Müller 1d2bef0a01 Use a special filter expression for Oracle to filter the prefix - fixes #13220 2015-01-12 16:28:11 +01:00
Thomas Müller 1f1643b35f Merge pull request #12995 from owncloud/tbelau666-master
Use Doctrines filter by table name
2015-01-09 14:17:14 +01:00
Arthur Schiwon ae9c9a46b8 inject and use user manager to delete command instead of using old static oc_user way 2015-01-07 12:21:28 +01:00
Morris Jobke 95374e1404 add default for dbtableprefix 2014-12-23 13:32:25 +01:00
Morris Jobke dbc465de97 use injected config object and fix typos 2014-12-22 10:55:52 +01:00
tbelau666 ad8d55c327 Use Doctrines filter by table name
Doctrine's SchemaManager can filter table names by regular expression.
On this way it picks up only ownClouds's tables in a database.

by tbelau666
2014-12-22 10:45:32 +01:00
Arthur Schiwon 4fa39250e7 LDAP User Cleanup: Port from stable7 without further adjustements
LDAP User Cleanup

background job for user clean up

adjust user backend for clean up

register background job

remove dead code

dependency injection

make Helper non-static for proper testing

check whether it is OK to run clean up job. Do not forget to pass arguments.

use correct method to get the config from server

methods can be private, proper indirect testing is given

no automatic user deletion

make limit readable for test purposes

make method less complex

add first tests

let preferences accept limit and offset for getUsersForValue

DI via constructor does not work for background jobs

after detecting, now we have retrieving deleted users and their details

we need this method to be public for now

finalize export method, add missing getter

clean up namespaces and get rid of unnecessary files

helper is not static anymore

cleanup according to scrutinizer

add cli tool to show deleted users

uses are necessary after recent namespace change

also remove user from mappings table on deletion

add occ command to delete users

fix use statement

improve output

big fixes / improvements

PHP doc

return true in userExists early for cleaning up deleted users

bump version

control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default.

improve doc

rename cli method to be consistent with  others

introduce ldapUserCleanupInterval in sample config

don't show last login as unix epoche start when no  login happend

less log output

consistent namespace for OfflineUser

rename GarbageCollector to DeletedUsersIndex and move it to user subdir

fix unit tests

add tests for deleteUser

more test adjustements

Conflicts:
	apps/user_ldap/ajax/clearMappings.php
	apps/user_ldap/appinfo/app.php
	apps/user_ldap/lib/access.php
	apps/user_ldap/lib/helper.php
	apps/user_ldap/tests/helper.php
	core/register_command.php
	lib/private/preferences.php
	lib/private/user.php

add ldap:check-user to check user existance on the fly

Conflicts:
	apps/user_ldap/lib/helper.php

forgotten file

PHPdoc fixes, no code change

and don't forget to adjust tests
2014-12-19 19:47:54 +01:00
Victor Dubiniuk c9fd3c9d29 Inject config 2014-12-10 01:13:38 +03:00
Victor Dubiniuk 303fce44f4 Use httphelper and cache response even when it empty 2014-12-06 20:17:47 +03:00
Morris Jobke 8ae8eb4734 drop dependency of some commands on old config object 2014-11-20 15:03:16 +01:00
Thomas Müller 136b0c22c9 Fix ctor call in OC\Core\Command\Upgrade 2014-11-03 13:53:59 +01:00
unclejamal3000 17f54a5fb6 Enhance question in DB migration script 2014-11-02 00:30:44 +01:00
Thomas Müller 2f19de11e4 adding console command to generate javascript translation files based on existing php translation files
read server side translations from json files
2014-10-29 10:09:12 +01:00
Robin Appelman d4e929c37a Remove implicit prepared statement cache and get the connection from the server container in \OC_DB 2014-10-22 12:26:43 +02:00
Thomas Müller a348a6f450 no loner use deprecated class \OC_Config 2014-09-22 12:04:48 +02:00
Thomas Müller e655d32979 remove bootstrapping - occ can by definition only be executed if ownCloud is installed - base.php is required earlier already 2014-09-22 12:00:22 +02:00
Thomas Müller 43c191fffb show upgrade errors as error in the console and report back that the upgrade process failed if it did 2014-09-22 11:59:13 +02:00
kondou b86e124e03 Warn user on resetting passwords via occ when encryption is enabled 2014-08-22 16:15:04 +02:00
Vincent Petry ca690c4d02 Added RepairStep interface and default repair step lists
The updater is using "before update" repair steps and "regular" repair
steps.
The "regular" repair steps are also used by the CLI tool.

Currently no steps exist but can be added later in the static methods in
the \OC\Repair class.

Added unit test to test messaging, error and exception cases.
2014-06-12 17:38:26 +02:00
Vincent Petry 6fcd1af4db Add support for repair step classes
This also makes it possible to unit test each repair step class
individually
2014-06-12 17:38:26 +02:00
Vincent Petry 5e27ac3e0d Added CLI arguments for upgrade simulation steps
Added "dry run" argument to only run the update simulation.
Added argument to disable migration (useful for bigger setups where
table duplication would take too much space)
2014-06-06 10:11:14 +02:00
Vincent Petry 5b97369b00 Simulate apps database schema update on upgrade
When upgrade, also simulate the database schema update for apps before
doing the actual upgrade.
2014-06-04 17:16:44 +02:00
Lukas Reschke 705242d390 Merge pull request #8727 from owncloud/upgrade-overview
Added update overview page
2014-05-29 21:28:47 +02:00
Andreas Fischer 9fba8221a6 Merge pull request #8554 from owncloud/add_resetadminpass_command
Add a resetadminpass command to console

* owncloud/add_resetadminpass_command:
  Move resetpassword into user: command space.
  Document type of user project.
  Receive \OC\User\Manager as a constructor dependency.
  Use userManager, color output, return 1 on error
  Add doc, check return-value, fix spacing, require interactive
  Back to the future
  Make ResetAdminPass to ResetPassword
  Add a resetadminpass command to console - fix #8248
2014-05-29 14:43:27 +02:00
Andreas Fischer 678a6b98ff Merge pull request #8748 from owncloud/cli_maintenance_mode
Add ability to enable/disable maintenance mode from cli.

* owncloud/cli_maintenance_mode:
  Use OC\Config instead of OC_Config
  Changed class name to mode
  Add ability to enable/disable maintenance mode from cli.
2014-05-29 03:45:49 +02:00
Andreas Fischer 5754b0b9e7 Merge remote-tracking branch 'owncloud/master' into add_resetadminpass_command
* owncloud/master: (238 commits)
  Change visibility of scanner internals
  [tx-robot] updated from transifex
  remove legacy OC_Filesystem being used in a hook callback
  add title property to share dialog
  forgotten infobox messages translations
  reverts 188c543 and translates only mail
  fix warning text and margin
  Adjust core apps to use "requiremin" instead of "require"
  Added requiremin/requiremax fields for apps
  [tx-robot] updated from transifex
  unwrapped strings fix
  allow resharing of files with only share permissions
  don't lose file size during rename
  drop superflous statement in phpdoc
  add preRememberedLogin hook and document this and postRememberedLogin in class descripttion. Also fixes documentation of postLogin hook
  [tx-robot] updated from transifex
  fix grammar
  make user_ldap fully translatable
  [tx-robot] updated from transifex
  fix typo
  ...

Conflicts:
	core/register_command.php
2014-05-28 22:57:33 +02:00
Andreas Fischer f81ee94cad Move resetpassword into user: command space. 2014-05-28 22:53:44 +02:00
Andreas Fischer 8981929e92 Document type of user project. 2014-05-28 22:48:35 +02:00
Andreas Fischer 52e7bf9630 Receive \OC\User\Manager as a constructor dependency. 2014-05-28 22:42:33 +02:00
scolebrook 43759f1f46 Use OC\Config instead of OC_Config 2014-05-28 16:26:13 -04:00
Lukas Reschke ce9d5df6df Merge pull request #8681 from owncloud/logintimestamp
Record login timestamp per user. Required for new user managament.
2014-05-28 19:06:47 +02:00
scolebrook 00f811f09c Changed class name to mode 2014-05-28 09:41:34 -04:00
scolebrook 7151369e5f Add ability to enable/disable maintenance mode from cli. 2014-05-27 13:03:53 -04:00
Vincent Petry 02f682b156 Now showing disabled apps as upgrade status line
- Added app id in update overview.
- Added status message for disabled app for CLI upgrade and web upgrade
2014-05-27 15:20:33 +02:00
kondou f216d81408 Use userManager, color output, return 1 on error 2014-05-24 09:49:02 +02:00
Arthur Schiwon 7f7999c7d8 print time in 24h format 2014-05-23 19:12:51 +02:00
Arthur Schiwon e9fa74bfb7 save a whitespace 2014-05-23 10:55:54 +02:00
Arthur Schiwon 09bb8e0e3a add cli command to check a users last login 2014-05-23 10:37:34 +02:00
Thomas Müller 0249c6d8c7 Merge pull request #8634 from owncloud/handle-excpetions-in-console-master
Handle excpetions in console master
2014-05-22 10:30:33 +02:00
Thomas Müller 58e22cefaf fix description of console command maintenance:repair - fixes #8574 2014-05-19 15:29:38 +02:00
kondou f75c863257 Add doc, check return-value, fix spacing, require interactive 2014-05-13 15:57:41 +02:00
Lukas Reschke 2a5e1a1885 Back to the future 2014-05-12 20:05:52 +02:00
kondou e5e77b370a Make ResetAdminPass to ResetPassword 2014-05-12 16:10:59 +02:00
kondou 011bd0a1c4 Add a resetadminpass command to console - fix #8248 2014-05-12 15:33:26 +02:00
Andreas Fischer 603ce95211 Add message about unsupported Microsoft SQL Server. 2014-05-09 12:31:29 +02:00
Andreas Fischer de78be3891 Store normalised DBMS type in $type. 2014-05-09 12:31:08 +02:00
Andreas Fischer 0a78fb49f5 Pass Connection instead of AbstractSchemaManager to clearSchema(). 2014-04-15 18:20:36 +02:00
Andreas Fischer f1d05d204e Use exceptions for in input validation. 2014-04-15 18:14:26 +02:00
Andreas Fischer 854dd8fa7c Do not block when nothing is passed via stdin. 2014-04-15 18:04:54 +02:00
Andreas Fischer d2c7a8ee59 Do not ask for password before input parameter validation. 2014-04-15 17:49:28 +02:00
Andreas Fischer 8e758513c8 Remove unnecessary sprintf. 2014-04-15 17:21:55 +02:00
Andreas Fischer 6b2876c64d Move (extended) input validation out into validateInput() method. 2014-04-15 17:20:31 +02:00
Andreas Fischer 5fe25868bc Add message for converting to SQLite being unsupported. 2014-04-15 17:14:26 +02:00
Andreas Fischer 9823d54bb8 Use a variable for the DBMS tyoe we are converting to. 2014-04-15 17:06:13 +02:00
Andreas Fischer 9cc41a2460 Move PostgreSQL sequence resynchronisation out into PgSqlTools class. 2014-04-14 18:37:47 +02:00
Andreas Fischer b0e6542dc2 Add error handling for --clear-schema on Oracle. 2014-04-14 18:37:47 +02:00
Andreas Fischer e3b0b40779 Do not quote table names on Oracle. They appear to be already quoted.
Without this commit, Oracle complains as follows:
  [Doctrine\DBAL\DBALException]
  An exception occurred while executing 'INSERT INTO "oc_appconfig" ("""appid""",
  """configkey""", """configvalue""") VALUES (?, ?, ?)' with params ["core",
  "installedat", "1396972927.537"]:

  ORA-01741: illegal zero-length identifier
2014-04-14 17:52:34 +02:00
Andreas Fischer f35eae6442 Remove unnecessary +1 from PostgreSQL sequence correction query. 2014-04-11 21:56:14 +02:00
Andreas Fischer 94522586c1 Better variable names for table arrays. 2014-04-11 21:46:02 +02:00
Andreas Fischer 731571491f Improve message about tables not going to be converted. Mention --all-apps option. 2014-04-11 21:40:45 +02:00
Andreas Fischer 56b6504d59 Extract schema creation code into its own method. 2014-04-09 16:46:21 +02:00
Andreas Fischer 370593361b Add option to create all app schemas instead of just installed app. 2014-04-09 16:42:22 +02:00
Andreas Fischer 5ef7d69d41 Do not attempt to covert to the same DBMS. 2014-04-09 15:57:33 +02:00
Andreas Fischer 03a3f66867 Move schema clearing to extra method. 2014-04-09 15:45:30 +02:00
Andreas Fischer 3e0858e51f private -> protected 2014-04-09 15:21:57 +02:00
Thomas Müller 86ab1cf476 typos fixed
PHPDoc comments added
2014-04-01 22:17:31 +02:00
Andreas Fischer 01141e1520 Type hinting. 2014-03-31 21:07:48 +02:00
Andreas Fischer b39a74ff6c Some more colors. 2014-03-31 20:51:30 +02:00
Andreas Fischer f9853b253c Deduplicate connection handling code into \OC\DB\ConnectionFactory 2014-03-31 20:09:07 +02:00
Andreas Fischer a585cec530 Remove unnecessary and incorrect comments. 2014-03-31 19:27:18 +02:00
Andreas Fischer e67cf99cef \InvalidArgumentException is in root namespace. 2014-03-31 18:20:24 +02:00
Andreas Fischer 5dbbe6d08b Doc blocks for properties do not repeat the property name. 2014-03-31 18:20:04 +02:00
Andreas Fischer b002f11771 Use question color. 2014-03-31 17:06:06 +02:00
Andreas Fischer e768ead820 Remove whitespace at end of lines. 2014-03-31 17:06:02 +02:00
Andreas Fischer 2d69c4c2d3 Merge remote-tracking branch 'owncloud/master' into db-convert-tool
* owncloud/master: (663 commits)
  [tx-robot] updated from transifex
  [tx-robot] updated from transifex
  Sub-dir was prepended twice
  Sub-dir was prepended twice
  [tx-robot] updated from transifex
  Use UrlGenerator in OC\Util::redirectToDefaultPage(). Fix #7936
  Emit event after setting a new expiration for a share
  adding @method annotation to declare methods which can be called on the wrapped statement object
  Fix CURLOPT_FOLLOWLOCATION bug with open_basedir or safe_mode restriction enabled.
  don't write file if opening a stream to encrypt the data fails
  Do not retrieve storage stats for trash bin
  [tx-robot] updated from transifex
  prevent dimmed ocdialog div from scrolling
  fix breadcrumbs for IE8
  enable SVG->PNG fallback for 'New' menu
  enable SVG->PNG fallback for newly uploaded files and folders
  specify logo to not repeat when container is bigger
  fix SVG replacement for logo so it works in IE8, fix #7866
  Fix swift touch operation
  [tx-robot] updated from transifex
  ...

Conflicts:
	3rdparty
2014-03-31 15:33:01 +02:00
Thomas Müller 6ff96b34ad Merge branch 'master' into load-apps-proper-master
Conflicts:
	apps/files/ajax/rawlist.php
	cron.php
	ocs/v1.php
2014-03-21 14:05:08 +01:00
Thomas Müller 6b9ae27b90 drop file cache migration OC5 -> OC6 2014-03-18 17:14:38 +01:00
Vincent Petry 1a116828cf Added warning for trusted_domains after CLI upgrade
If trusted_domains is not set after a CLI upgrade, show a warning in the
output.
2014-03-14 11:16:45 +01:00
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
Bart Visscher 8a6dcdf4a4 Move password interaction to interact function 2014-02-17 18:09:42 +01:00
Bart Visscher bcb78e48b2 Split execute function into multiple functions 2014-02-17 18:02:58 +01:00
Bart Visscher ae525d1f12 Fix namespace for Exception 2014-02-12 17:42:55 +01:00
Bart Visscher 3abcd13979 Allow converting from any db type 2014-02-11 18:01:41 +01:00
Bart Visscher eede20c5ac Check target DB type 2014-02-11 17:59:50 +01:00
Thomas Müller 79fc4f3126 Within OC:init() the minimum set of apps is loaded - which is filesystem, authentication and logging 2014-02-06 11:34:27 +01:00
Thomas Müller afbe50d09c remove global variable $RUNTIME_NOAPPS - it's just superfluous 2014-02-06 09:44:13 +01:00
Bart Visscher b57299f727 Merge branch 'master' into db-convert-tool
Conflicts:
	3rdparty
2014-01-30 18:16:55 +01:00
Bart Visscher 2638fd4767 Postgresql needs the sequences adjusted after the inserts 2014-01-11 12:25:35 +01:00
Bart Visscher af3bedf985 Add option to remove all the tables from the destination database 2014-01-11 12:23:28 +01:00
Bart Visscher 1b7eb4dc6c Quote column names on insert 2014-01-11 12:22:23 +01:00
Arthur Schiwon bc1235d325 Add command line tool to show numbers of users and user directories 2014-01-07 23:06:37 +01:00
Bart Visscher 4e1a3f212f Review points 2013-12-24 13:44:35 +01:00
Bart Visscher 202e26647e Inject config object 2013-12-24 13:36:32 +01:00
Bart Visscher 731e83c35a Save the new database config 2013-12-07 15:14:54 +01:00
Bart Visscher 22edc42f54 Add UTF8 charset to connection params 2013-12-07 15:09:36 +01:00
Bart Visscher e4c31b362e Add command for converting sqlite database to server based one 2013-12-07 14:44:23 +01:00
Robin Appelman 10d84f6e9b Add a (currently) empty system for running common repair steps 2013-11-26 14:12:48 +01:00
Robin Appelman 9fbccc83e3 merge master into single-user-mode 2013-11-25 21:25:04 +01:00
Robin Appelman abe63bd329 Add occ command to list all apps 2013-11-25 17:34:16 +01:00
Robin Appelman fc1d897ea5 rename app_id to app-id 2013-11-25 17:28:01 +01:00
Robin Appelman a324c09e6c Add occ command to enable and disable single user mode 2013-11-25 15:27:05 +01:00
Robin Appelman d3bfb433d1 add occ commands for enabling and disabling apps 2013-11-25 13:20:16 +01:00
Andreas Fischer 70111ea299 Add some color to the occ upgrade output. 2013-10-28 22:26:44 +01:00
Andreas Fischer b8dbec0da4 Use "else if" to remove one level of indentation. 2013-10-28 22:22:59 +01:00
ringmaster f130caa4a2 Missed one write()->writeln(). Fixed. 2013-10-28 17:06:36 -04:00
ringmaster bca1e12597 Use writeln() instead of write() 2013-10-28 16:53:36 -04:00
ringmaster d1c5e5d777 Use the OutputInterface for output and return error codes. 2013-10-28 16:50:28 -04:00
ringmaster a24cbb50af Move all upgrade routines into the command-line tool. 2013-10-28 10:15:56 -04:00
ringmaster 29a21466f3 Add `occ upgrade` command. 2013-10-24 13:59:39 -04:00
Thomas Müller 6e1881dbe4 new console command to generate sql migration scripts 2013-10-17 12:51:30 +02:00
Bart Visscher a9ea99e93d Add copyright, remove starting blank line 2013-09-19 19:12:16 +02:00
Bart Visscher 44b3e71ed4 Cleanup and more style fixes 2013-09-02 18:20:04 +02:00
Bart Visscher 0aba549e7f Use more object oriented way for console commands 2013-09-01 16:40:50 +02:00