Javi Martín
f5b60e03e1
Don't let valuators update investments
...
There were some confusing definitions regarding the valuation of budget
investments.
In the controller, `CommentableActions` was included, which includes the
update action.
In the abilities, a valuator was given permission to update an
investment.
However, the action to update an investment didn't work because there is
no route defined to do so.
The ability was defined so valuators could access the "edit" action,
which will not call the "update" action but the "valuate" action. Since
internally "edit" and "update" use the same permission, it worked.
But then we added permission for regular users to update budget
investments, and these permissions were allowing valuators to update
another user's investment.
After this change, everything seems to work properly since we check
authorization in the controller itself instead of using abilities.
2019-10-18 16:24:27 +02:00
denialtorres
bb627a7117
Edit Budget Investment only in accepting phase ( #3716 )
...
This way users who made a typo can fix it before the investment is reviewed.
2019-10-18 13:59:14 +02:00
Javi Martín
c6808c9c12
Directly assign valuator groups in specs
2019-09-30 15:20:56 +02:00
Javi Martín
a9159e0ec8
Directly assign valuators in specs
...
Creating a record and then assigning an association makes the code even
harder to follow.
2019-09-30 15:08:27 +02:00
Javi Martín
aeb1655961
Use budget phase traits
...
We were already using them in many places, but not everywhere.
2019-09-24 21:34:06 +02:00
Javi Martín
969a4e21c9
Apply RSpec/RepeatedExample rubocop rule
2019-09-10 21:43:39 +02:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Senén Rodero Rodríguez
0239efef9d
Allow administrators to run local census records importation
...
Allow only administrator users to run local census records importation
process
2019-07-29 13:07:24 +02:00
Senén Rodero Rodríguez
5fa1bd8a6f
Allow administrator users the ability to manage all LocalCensusRecords
...
Also check that other kind of users are not able to manage
LocalCensusRecords.
2019-07-29 13:07:24 +02:00
lalo
c6e4b2480f
Add public changes to create and vote Poll:Questions with votation type
2019-06-12 19:44:14 +02:00
lalo
23d36835d7
Add Admin changes to create Poll:Questions with votation type
2019-06-12 19:44:14 +02:00
lalo
c2860dda0e
Add can_comment and can_edit_dossier abilities to valuators
2019-06-11 16:24:02 +02:00
voodoorai2000
d0b8fef6b3
Delete spending proposals
2019-05-31 18:22:59 +02:00
voodoorai2000
24dde9c35e
Delete valuation
2019-05-31 15:43:06 +02:00
Javi Martín
4f4dc2c2af
Add show results and stats form to budgets
2019-05-22 11:50:03 +02:00
Javi Martín
c00203f7f5
Move budget stats permission tests to the model
...
They're easier to test and to read in the model.
2019-05-22 11:50:03 +02:00
decabeza
91be3cf775
Fix more hound warnings
2019-03-27 15:22:14 +01:00
decabeza
eda6ea7f12
Merge branch 'master' into dashboard
2019-03-26 16:45:48 +01:00
Julian Herrero
31ac8b7f55
Change single quotes to double quotes
2019-02-15 11:40:39 +01:00
Alberto
f9b18667e6
Merge pull request #3280 from consul/next-filters
...
[Backport] Removes next/incoming filters
2019-02-11 20:43:09 +01:00
decabeza
bc1679550b
Remove incoming polls filter
2019-02-08 14:28:19 +01:00
Julian Herrero
54e59a8a58
LegacyLegislation migration cleanup
...
These legacy models are not used anymore.
2019-02-06 17:07:38 +01:00
Juan Salvador Pérez García
f875ded0be
Bugfixing and enhancements
...
* Fixed common ability: Retired draft proposal can't be published.
* Fixed proposal dashboard view: progress graph is not available for
draft proposals.
2018-09-13 18:22:59 +02:00
Juan Salvador Pérez García
6cc1ddb9af
Fixes #231
...
Implements a poster feature for the proposals dashboard
2018-07-31 12:50:25 +02:00
Juan Salvador Pérez García
8876b285ce
Fixes #229
...
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Juan Salvador Pérez García
e5f9cf6710
Fixed #239
...
Proposals dashboard refactored to dashboard.
Added missing specs for the dashboard.
2018-07-24 15:52:43 +02:00
Juan Salvador Pérez García
f439fc7371
Fixes #218
...
Added check in poll card that allows setting the value of
results_enabled flag.
Access to stats/results now is controlled with abilities.
Polls related to proposals will be accessible to the proposal author
like they were administrators.
2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
2be107f4da
Specs
...
Added specs and fixed some issues found after executing them
2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
28e17abe72
Syntax for specs adjusted for consistency reasons
...
is_expected.to has been replaced by should
is_expected.not_to has been replaced by should_not
2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
f9a085a400
Implements graph for dashboard
...
Implements graph secion for dashboard.
Dashboard related actions have been agrupated inside a menu in the admin
section.
Minor bugfixes.
2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
33b3431c70
Implements #150
...
Adds an entry inside moderation section that allows moderators to check
pending tasks and mark them as solved.
2018-07-17 17:52:47 +02:00
Juan Salvador Pérez García
83f78b1940
Fixes #135
...
Adds a table with proposed actions in the dashboard. The user can mark
an action as executed.
2018-07-17 17:51:13 +02:00
Juan Salvador Pérez García
1464bddfa8
Fixes #134
...
Adds an administration interface for the proposal dashboard actions.
2018-07-17 17:48:46 +02:00
Angel Perez
31c16406c0
Move disable recommendations permissions to Abilities::Common model
2018-07-15 21:28:58 -04:00
rgarcia
7a01745188
Add valuation permissions to groups
2018-04-03 20:58:35 +02:00
Bertocq
1ef2789640
Trim valuator investment valuation ability scope
...
Valuators shouldn't be able to valuate an investment which valuation has
already been finished (only admins can)
2018-03-06 20:18:05 +01:00
Angel Perez
88a5e8b1d2
Spec: Admins/users can destroy only their authored documentables/imageables ( #2375 )
2018-01-26 09:10:58 -04:00
Bertocq
43c8506f84
Remove deprecated expecations about admin image&doc destroyal
2018-01-24 21:42:20 +01:00
Bertocq
3762fd347e
Enable RSpec/ScatteredSetup & fix issue
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
2018-01-07 18:46:58 +01:00
Bertocq
f8fb32db76
Enable RSpec/ScatteredLet cop & fix issue
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
2018-01-07 18:46:58 +01:00
Bertocq
16eae689f9
Enable RSpec/RepeatedExample cop & fix all issues
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
2018-01-07 18:46:32 +01:00
Bertocq
1441de5107
Enable RSpec/HookArgument cop and fix issues
...
To be consistent about before/after arguments, as `:each` or `:example`
are same and default scopes, best not to send an argument in those
scenarios.
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
2018-01-07 02:07:19 +01:00
Bertocq
2253155a51
Enables RSpec/EmptyLineAfterSubject & fixes all issues
...
Read more about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
2018-01-07 00:50:50 +01:00
Bertocq
fa017b664f
Enables RSpec/EmptyLineAfterFinalLet cop & fixes all issues
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
2018-01-07 00:49:37 +01:00
Bertocq
6ec6f64675
Enable RSpec/DescribeClass rubocop rspec cop & fix issues
...
Manually fixes all issues & "stashed" false positives at .rubocop_todo.yml
Read about the cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
2018-01-07 00:20:55 +01:00
BertoCQ
01e4447050
Merge pull request #1923 from wairbut-m2c/iagirre-preview-budget-results
...
Admins can see the preview of the budgets' results before the balloti…
2017-10-02 21:40:04 +02:00
Senén Rodero Rodríguez
2993ef8707
Remove documents single uploads
2017-09-27 11:04:56 +02:00
Senén Rodero Rodríguez
eef8ad1b73
Remove images single uploads
2017-09-27 10:41:48 +02:00
Senén Rodero Rodríguez
ce29185b76
Fix documentable on admin poll questions. Adapt nested documentable shared specs to admin fetaure specs and include at admin poll questions specs.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
88a7a29d27
Remove new_nested action from documents controller. Use cocoon gem to manage new nested fields creation on documents.
2017-09-26 13:57:13 +02:00