Commit Graph

120 Commits

Author SHA1 Message Date
decabeza
51ced318e0 Merge branch 'master' into proposal-dashboard 2019-04-29 13:48:23 +02:00
Javi Martín
286e0ca878 Handle AccessDenied in management sessions
We were raising a `CanCan::AcessDenied` and were getting a 500 Internal
Server Error.

I've chosen to do the same thing we do in the ApplicationController.
There are other options to handle this request, like redirecting to the
login page or returning a 401 Unauthorized HTTP status.
2019-04-25 20:36:50 +02:00
decabeza
cb22e6cbfb Merge branch 'master' into proposal-dashboard 2019-04-23 17:12:47 +02:00
rgarcia
a4f0161aa8 fixes specs related to ActionController params 2019-04-17 17:40:55 +02:00
decabeza
f47ec9d7dc Fix hound warnings 2019-03-26 18:21:19 +01:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
d24376f6ad Use double quotes in controllers/ 2019-03-13 22:19:49 +01:00
Julian Herrero
23b6e38915 Remove unused before_action 2019-01-25 08:54:28 +01:00
rgarcia
82a2dd622b hotfix to load categories on error 2018-12-28 09:43:08 +01:00
Julian Herrero
bf7112f090 make parameter 'skip_map' accessible on creating an investment 2018-12-27 18:39:27 +01:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
Javier Martín
157cd001d5 Add spec to expose a bug finding manager logged in
I've moved the method to the User model in order to make it easier to
test. I'm not sure where it belongs, though.

There was already a failing spec in `spec/features/management_spec.rb`,
but it passed if run standalone because it only failed if previous tests
had already created nine users or more.
2018-07-28 22:03:33 +02:00
Juan Salvador Pérez García
77dd60427d Implements story #136
Adds draft state for proposals
2018-07-17 17:46:54 +02:00
iagirre
2fafceb81d Errors after running Travis fixed 2018-07-15 17:35:30 -04:00
iagirre
7a7ae5fa2e The admin menu is shown in the management section if the user who logged in is an admin 2018-07-15 17:32:30 -04:00
Javier Martín
f2ef27d3ae Always set Globalize.locale after I18n.locale.
The test "Budget Investments Show milestones" was failing in certain
cases where `Globalize.locale` had been changed in a previous test.

Since having different values in `Globalize.locale` and `I18n.locale`
has proven to be an issue on the test enviroment, this commit also
changes application code in order to avoid similar situations on
production.

See issue #2718.
2018-07-03 00:52:20 +02:00
iagirre
e8b91356b3 Backend functionality to let managers update users password
The back button when the user changes the password
(in the print password page) redirects to the
edit manually page.

The routes to access password edit pages has been added,
along with the ones to send reset password email and
reset password manually.
2018-04-02 09:43:24 +02:00
rgarcia
952df2947a Duplicate current_budget method in management_base_controller
This method is already existent in the application_controller but it
seems a little overkill to create a concern just for this method

Maybe when we have multiple method it makes sense to create a nice
controller. Another option would be to make the
management_base_controller extend from the application_controller
2018-01-17 12:50:17 +01:00
rgarcia
eca971a648 Use current_budget instead of Budget.current 2018-01-16 19:34:21 +01:00
rgarcia
01ef439053 Display only current budget to Managers printing investments
In the specs, some investment were missing a heading_id, thus creating
another unexpected budget

By explicitly setting the heading_id we can control better which
budgets are created in each test
2018-01-15 22:02:04 +01:00
rgarcia
ebb3c075b0 fixes proposal's management specs 2017-12-15 09:58:12 +01:00
Bertocq
91fcea03b1 Remove useless parentheses on new() call 2017-09-25 22:51:07 +02:00
taitus
9b6b57a24c Remove all white spaces 2017-09-06 14:12:32 +02:00
Bertocq
4e0d88739d Fix Rails/Blank rubocop issue 2017-07-10 23:02:27 +02:00
Bertocq
69f4e1c683 Fix all rubocop Metrics/LineLength issues (140+) 2017-07-10 13:22:49 +02:00
Raimond Garcia
22d28d9c79 Merge branch 'master' into issue#1575-tag-administration 2017-06-29 19:09:54 +02:00
Bertocq
f6fe9cc7d2 Fix all Layout/SpaceAroundOperators rubocop issues and remove file list from rubocop_todo list 2017-06-26 18:04:20 +02:00
Eduardo Martinez Echevarria
8dd52110db Use category scope instead of condition on kind on Tag 2017-06-23 17:34:55 +02:00
Raimond Garcia
09a2f2b795 Merge pull request #1660 from consul/fix/rubocop_issues
Fix some Rubocop issues
2017-06-20 21:49:59 +02:00
Juanjo Bazán
315c57929a allows managers to create users without email
allows managers to create users without email

hides email preferences from account page for email-less users

prevents email delivery to users with no email

adds spec for user creation from management

adds specs for user's email requirement

adds spec for no deliveries if no email
2017-06-19 13:02:48 +02:00
Bertocq
21c6d1c4dd Cleanup Lint/AssignmentInCondition rubocop issues on code and remove it from ruboco_todo list 2017-06-19 10:45:18 +02:00
Juanjo Bazán
e922a11aa3 permits fields in management investment creation 2017-05-19 11:32:14 +02:00
Alberto Garcia Cabeza
dadfdba1b1 adds date of birth form when manager creates new user 2017-03-20 11:59:22 +01:00
rgarcia
170cb89a5c allows admins to see budgets in reviewing and selecting phase 2017-03-15 14:50:50 +01:00
rgarcia
17946b292b fixes specs 2017-01-13 16:37:39 +01:00
rgarcia
be10972406 fixes management specs 2017-01-08 13:39:01 +01:00
kikito
54bd5aeeb1 adds @budget param to apply_filters_and_search 2016-12-22 20:26:21 +01:00
kikito
2a258fc558 Refactors set_investment_votes 2016-12-14 13:42:12 +01:00
kikito
8d60ea1d3c Refactors apply_filters_and_search to inside investment model 2016-12-14 13:39:54 +01:00
kikito
748fd8becf Makes all tests pass in bi management 2016-12-07 19:16:37 +01:00
kikito
b3be1633af Fixes all management bi issues except filtering by geozone 2016-12-07 16:35:27 +01:00
kikito
e6cbc4acf6 Fixes spec 2016-12-06 18:13:29 +01:00
kikito
e793a0d8e1 Adapts management::budget_investments to new budgets 2016-12-06 18:05:58 +01:00
kikito
0564392964 Introduces management budgets 2016-12-06 18:02:25 +01:00
kikito
882565aeca Adds more controller variables and uses them in investment controller 2016-12-05 17:35:40 +01:00
kikito
003056fe75 Moves bi management controller 2016-12-02 19:16:31 +01:00
kikito
00cfb95913 Starts fixing management budget investments 2016-12-01 16:31:05 +01:00
kikito
2a2179d0f3 Merge branch 'master' into budget 2016-11-28 11:41:49 +01:00
kikito
f0b8cfd4a2 Time.now -> Time.current 2016-11-23 19:19:19 +01:00
rgarcia
bb3c4c6399 adds consistency to ruby code style
Keep a blank line before and after private
Keep a blank line before and after protected
Remove extra empty line at class body end
Remove extra blank line
Add final newline
Use 2 (not 3) spaces for indentation
Use 2 (not 4) spaces for indentation
Remove space before comma
Add space after comma
Remove trailing whitespaces
Remove unnecessary spacing
Use snake_case for variable names
Do not use then for multi-line if
Remove unused block argument - i
Use the new Ruby 1.9 hash syntax
Remove unused assignment to variable
Indent when as deep as case
Align attributes
Align end with def
2016-11-15 11:18:43 +01:00