diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php new file mode 100644 index 000000000..f0e016c8c --- /dev/null +++ b/app/DoctrineMigrations/Version20161128131503.php @@ -0,0 +1,61 @@ + 'smallint', + 'credentials_expire_at' => 'datetime', + 'expires_at' => 'datetime', + ]; + + /** + * @var ContainerInterface + */ + private $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('user')); + + foreach ($this->fields as $field => $type) { + $this->skipIf(!$userTable->hasColumn($field), 'It seems that you already played this migration.'); + $userTable->dropColumn($field); + } + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('user')); + + foreach ($this->fields as $field => $type) { + $this->skipIf($userTable->hasColumn($field), 'It seems that you already played this migration.'); + $userTable->addColumn($field, $type); + } + } +} diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 8a20cbe08..c9e219599 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'Emailadresse' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 68e9c3333..b84bd9d39 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'E-Mail-Adresse' enabled_label: 'Aktiviert' - locked_label: 'Gesperrt' last_login_label: 'Letzter Login' twofactor_label: Zwei-Faktor-Authentifizierung save: Speichern diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 9e13ad0ee..4b92fe97d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'Email' enabled_label: 'Enabled' - locked_label: 'Locked' last_login_label: 'Last login' twofactor_label: Two factor authentication save: Save diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index b8764876f..02ce7e19b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'Email' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index e1bfcade1..99c0f71b6 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'نشانی ایمیل' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 2e4f4f431..5579bf1fa 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -503,7 +503,6 @@ user: plain_password_label: "Mot de passe en clair" email_label: "Adresse courriel" enabled_label: "Activé" - locked_label: "Bloqué" last_login_label: "Dernière connexion" twofactor_label: "Double authentification" save: "Sauvegarder" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index d84f7dbf9..92ccef687 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'E-mail' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index f2215a072..9ef3b4754 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -503,7 +503,6 @@ user: plain_password_label: 'Senhal en clar' email_label: 'Adreça de corrièl' enabled_label: 'Actiu' - locked_label: 'Varrolhat' last_login_label: 'Darrièra connexion' twofactor_label: 'Autentificacion doble-factor' save: 'Enregistrar' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 9e6d3565d..9e3726a56 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -315,7 +315,7 @@ howto: toggle_favorite: Oznacz wpis gwiazdką toggle_archive: Oznacz wpis jako przeczytany delete: Usuń wpis - material_title: Skróty dostępne wyłącznie w motywie Material + material_title: Skróty dostępne wyłącznie w motywie Material add_link: Dodaj nowy link hide_form: Ukryj obecny formularz (wyszukiwania lub nowego linku) arrows_navigation: Nawiguj pomiędzy artykułami @@ -503,7 +503,6 @@ user: plain_password_label: 'Jawne hasło' email_label: 'Adres email' enabled_label: 'Włączony' - locked_label: 'Zablokowany' last_login_label: 'Ostatnie logowanie' twofactor_label: Autoryzacja dwuetapowa save: Zapisz diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 3dd6e7d8a..abe51305f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'E-mail' enabled_label: 'Habilitado' - locked_label: 'Travado' last_login_label: 'Último login' twofactor_label: 'Autenticação de dois passos' save: 'Salvar' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 0386c0b6e..88780b542 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'E-mail' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 74601f4e1..db0a9bbfe 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -503,7 +503,6 @@ user: plain_password_label: '????' email_label: 'E-posta' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save diff --git a/src/Wallabag/UserBundle/Form/UserType.php b/src/Wallabag/UserBundle/Form/UserType.php index cfa677938..d8cdbaf95 100644 --- a/src/Wallabag/UserBundle/Form/UserType.php +++ b/src/Wallabag/UserBundle/Form/UserType.php @@ -35,10 +35,6 @@ class UserType extends AbstractType 'required' => false, 'label' => 'user.form.enabled_label', ]) - ->add('locked', CheckboxType::class, [ - 'required' => false, - 'label' => 'user.form.locked_label', - ]) ->add('twoFactorAuthentication', CheckboxType::class, [ 'required' => false, 'label' => 'user.form.twofactor_label', diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig index 67843f201..3ffd15f5d 100644 --- a/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig @@ -47,14 +47,6 @@ -