From 968f08a18b4dba60eba28ecd978fc86179e88da2 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Mon, 4 Apr 2016 22:10:56 +0200 Subject: [PATCH 1/3] Improve README with info to use and verify the default admin user --- README.md | 14 ++++++++++++++ README_ES.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README.md b/README.md index 251a0f8e3..4d28ffcd8 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,20 @@ Run the tests with: bin/rspec ``` +You can use the default admin user from the seeds file: + + **user:** admin@madrid.es + **pass:** 12345678 + +But for some actions like voting, you will need to verify him, opening a console with `rails console` and then: +``` +a = User.first +a.verified_at = Date.today +a.level_two_verified_at = Date.today +a.residence_verified_at = Date.today +a.save +``` + ## Licence Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)) diff --git a/README_ES.md b/README_ES.md index c3fd3cdff..c6e1867ec 100644 --- a/README_ES.md +++ b/README_ES.md @@ -55,6 +55,20 @@ Para ejecutar los tests: bin/rspec ``` +Puedes usar el usuario administrador por defecto del fichero seeds: + + **user:** admin@madrid.es + **pass:** 12345678 + +Pero para ciertas acciones, como apoyar, necesitarás verificarle, abre una consola con `rails console` y escribe: +``` +a = User.first +a.verified_at = Date.today +a.level_two_verified_at = Date.today +a.residence_verified_at = Date.today +a.save +``` + ### OAuth Para probar los servicios de autenticación mediante proveedores externos OAuth — en este momento Twitter, Facebook y Google —, necesitas crear una "aplicación" en cada una de las plataformas soportadas y configurar la *key* y el *secret* proporcionados en tu *secrets.yml* From 37b7d75675a997b58b4f4cd6ca3a41b6c5a0a441 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Mon, 4 Apr 2016 22:12:01 +0200 Subject: [PATCH 2/3] Add OAuth paragraph, translated from spanish version --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4d28ffcd8..4732e530c 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,12 @@ a.residence_verified_at = Date.today a.save ``` +### OAuth + +To test authentication services with external OAuth suppliers - right now Twitter, Facebook and Google - you'll need to create an "application" in each of the supported platforms and set the *key* and *secret* provided in your *secrets.yml* + +In the case of Google, verify that the APIs *Contacts API* and *Google+ API* are enabled for the application. + ## Licence Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)) From 7bcb6695fa41a8b89c7ffe43341631c3f8049630 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Tue, 5 Apr 2016 13:58:29 +0200 Subject: [PATCH 3/3] Simplify the user verification code for console --- README.md | 6 +----- README_ES.md | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4732e530c..a56c5bab0 100644 --- a/README.md +++ b/README.md @@ -63,11 +63,7 @@ You can use the default admin user from the seeds file: But for some actions like voting, you will need to verify him, opening a console with `rails console` and then: ``` -a = User.first -a.verified_at = Date.today -a.level_two_verified_at = Date.today -a.residence_verified_at = Date.today -a.save +User.first.update_attributes(verified_at: Date.today, residence_verified_at: Date.today, level_two_verified_at: Date.today) ``` ### OAuth diff --git a/README_ES.md b/README_ES.md index c6e1867ec..fd5b79324 100644 --- a/README_ES.md +++ b/README_ES.md @@ -62,11 +62,7 @@ Puedes usar el usuario administrador por defecto del fichero seeds: Pero para ciertas acciones, como apoyar, necesitarás verificarle, abre una consola con `rails console` y escribe: ``` -a = User.first -a.verified_at = Date.today -a.level_two_verified_at = Date.today -a.residence_verified_at = Date.today -a.save +User.first.update_attributes(verified_at: Date.today, residence_verified_at: Date.today, level_two_verified_at: Date.today) ``` ### OAuth