Commit Graph

29 Commits

Author SHA1 Message Date
taitus
d0359d584e Remove trait :current for poll on factories
When we create a poll with "create(:poll)" it is already a current poll.
2022-09-14 15:14:23 +02:00
Javi Martín
13f95e9419 Add SDG phase model
The purpose of this model will be to have different sections in the SDG
index.
2021-01-14 17:38:01 +01:00
Javi Martín
de4be15a8d Add empty SDG index 2020-12-23 13:18:10 +01:00
taitus
9fe24aec9d Add sdg manager section to admin
Allow a user to become an sdg manager
2020-12-16 13:16:45 +01:00
taitus
fb5965fe63 Add cancancan to SDG content
Only allow access to the SDG content section to administrators and sdg managers
2020-12-16 11:43:17 +01:00
Javi Martín
14df74fed7 Add collaborative legislation summary again
It was removed in commit 128a8164 because we hadn't reviewed it nor
tested it properly. We're now adding it again, fixing the issues we've
found while reviewing.
2020-09-08 13:32:08 +02:00
Javi Martín
ed6a4a1b95 Don't generate stats for budget polls
The link to show stats for these polls is nowhere to be seen in the
application, and these stats are included in the budget stats, so it
makes sense to restrict access to them.
2019-11-09 19:34:24 +01:00
Javi Martín
8dbad5c3d2 Simplify tests for stats and results permissions
Now these tests look like the other ability tests.
2019-11-09 15:18:58 +01: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
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
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +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
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
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
1464bddfa8 Fixes #134
Adds an administration interface for the proposal dashboard actions.
2018-07-17 17:48:46 +02: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
iagirre
e90ac7e72d Admins can see the preview of the budgets' results before the balloting phase is finished.
Cambios para hacer commit:
	modificado:    app/models/abilities/administrator.rb
	modificado:    app/views/budgets/show.html.erb
	modificado:    spec/models/abilities/administrator_spec.rb
	modificado:    spec/models/abilities/everyone_spec.rb
2017-09-26 11:16:32 +02:00
rgarcia
f24a8887bb fixes conflicts with master 2016-07-19 14:49:27 +02:00
rgarcia
85d9dd4b84 integrates cancan with budgets 2016-07-19 14:41:55 +02:00
rgarcia
43251585b9 pending permissions spec 2016-06-07 13:56:40 +02:00
Juanjo Bazán
2c36ceb10c adds abilities for SpendingProposals 2016-01-11 12:15:42 +01:00
rgarcia
816a95b7b7 adds comment show view 2016-01-07 15:18:28 +01:00
kikito
82af488ce3 Splits ability.rb and specs into several smaller files
I'm doing this in preparation for the "Manager" ability, which will
require even more refactors of the abilities (for example,
manager can not modify their own account)
2015-09-28 13:51:42 +02:00