Commit Graph

106 Commits

Author SHA1 Message Date
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
23d36835d7 Add Admin changes to create Poll:Questions with votation type 2019-06-12 19:44:14 +02:00
German Galia
74083df10f Add historic fields to participatory budget 2019-06-12 18:03:53 +02:00
German Galia
9ce524e1f3 Create tracker rol 2019-06-12 16:23:40 +02:00
Raimond Garcia
259e05c3e0 Merge pull request #3410 from LextrendIT/report_generation
Report generation, download CSV
2019-06-12 11:45:59 +02:00
German Galia
9d1ca3bfd4 Report generation. Download csv 2019-06-12 10:17:31 +02:00
lalo
c2860dda0e Add can_comment and can_edit_dossier abilities to valuators 2019-06-11 16:24:02 +02:00
Julian Herrero
fd71ed825b Avoid error when accessing final votes stats before balloting phase
When accessing the URL `/admin/stats/budget_balloting?budget_id=X'
for a budget in a phase prior to the balloting phase, the following
error was raised due to the stats where not calculated yet.
Instead, we'll now show a flash message.

NoMethodError:
  undefined method `[]' for nil:NilClass
  ./app/controllers/admin/stats_controller.rb:82
2019-06-10 17:28:16 +02:00
lalo
d0e1eff532 Add description field to administrator users like evaluators description 2019-06-05 16:18:12 +02:00
voodoorai2000
24dde9c35e Delete valuation 2019-05-31 15:43:06 +02:00
Javi Martín
66ecb2835b Show only available budget stats phases
This way we can show statistics for the supports phase before the vote
phase is over.
2019-05-21 13:50:18 +02:00
María Checa
c2457e36a5 Add budget stats permissions for normal users and admins 2019-05-16 22:01:42 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
54e59a8a58 LegacyLegislation migration cleanup
These legacy models are not used anymore.
2019-02-06 17:07:38 +01:00
Julian Herrero
8f112cf37e Allow admins delete poll answer documents 2019-01-24 19:19:04 +01:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
decabeza
4db54092e6 Removes unrelated dashboard changes 2018-10-18 01:26:07 +02:00
María Checa
6d5e1a075e Allow admins to access Legislation::Proposal #show and Legislation::Process #proposals 2018-10-03 16:01:18 +02:00
Javi Martín
471061f475 Allow only admins to attach CKEditor images
Right now allowing regular users to attach images would make us
vulnerable to CSRF attacks.
2018-09-12 12:35:28 +02:00
Alberto
fb19aafee7 Merge pull request #2778 from wairbut-m2c/backport/investments-moderation
Allow budget investments to be moderated
2018-07-27 12:34:17 +02:00
María Checa
2dd5fe22a8 Removes permissions for admins to access unfinished budget results 2018-07-26 11:07:19 +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
Angel Perez
bcb0b9fbfa Enable moderation abilities for Budget::Investment model 2018-07-20 18:03:11 -04: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
1464bddfa8 Fixes #134
Adds an administration interface for the proposal dashboard actions.
2018-07-17 17:48:46 +02:00
rgarcia
1dbbe331c9 Assign valuators to groups 2018-04-03 20:55:44 +02:00
María Checa
f1fbe7ff29 Modified administrator abilities for newsletters 2018-02-14 16:05:31 +01:00
Bertocq
26cf91c61a Create valuation comments creation ability
Why:

Only admins or valuators (for those investments they've assigned) can
create internal valuation comments on them.

How:

* Creating a new `comment_valuation` ability for admins and valuators in
the same manner the `valuate` ability works.

* Adding a validation at Comment model for those with `valuation` flag
active that checks if the author can make a valuation comment on the
commentable, as well as the respective active record error messages.
This will prevent comments from being created at a controller level as
well.

* Improving comment factory trait `valuation` to have an associated
investment, author that is a valuator and setting the valuator on the
valuators list of the investment
2018-01-31 02:03:03 +01:00
Bertocq
6dcd01366c Preven admins from destroying others images&docs 2018-01-24 17:07:13 +01:00
Angel Perez
db86cc5216 Enable 'destroy' action for Valuator on controller 2017-11-17 13:12:26 -04:00
decabeza
f0cfe50de4 Merge branch 'master' into 1856-legislation_processes_proposals_phase 2017-10-25 11:52:31 +02:00
María Checa
84f67db26d Added restrictions to access Poll results and stats 2017-10-23 14:17:25 +02:00
Bertocq
45d91a7e50 Add Poll booth_assignments and :Poll::BoothAssignment manage routes, actions and views 2017-10-19 19:27:26 +02:00
María Checa
841ef2a3a2 Merge branch 'master' into 1856-legislation_processes_proposals_phase 2017-10-09 17:19:07 +02:00
María Checa
05d40c0ede Merge branch 'master' into polls_minor_changes 2017-10-03 16:22:33 +02:00
María Checa
e6b5de77fe Removed files that are not being used 2017-10-03 10:50:18 +02:00
Bertocq
9ae72387fe Remove remove_question ability from admin on Poll 2017-10-02 23:29:57 +02: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
eef8ad1b73 Remove images single uploads 2017-09-27 10:41:48 +02:00
Senén Rodero Rodríguez
826385f659 Extract ajax upload and destroy_upload actions from images and documents controllers and place them at new controllers to manage direct uploads 2017-09-26 13:55:28 +02:00
Senén Rodero Rodríguez
d1d2a31876 Remove permissions of obsolete actions. Add missing image managment abilities to common and administrator specs. 2017-09-26 13:55:03 +02:00
Senén Rodero Rodríguez
6f71da07ee Duplicate documentable code and rename for imageable 2017-09-26 13:55:03 +02:00
Senén Rodero Rodríguez
4469aa9b32 Allow to remove budget investment image from edit image page to authors and administrators. 2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
ce0c0f7024 Allow administrators to edit and update images of any budget investment. 2017-09-26 13:53:42 +02: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
María Checa
393e9f2b6a Added permissions for Legislation:Proposal 2017-09-14 17:38:42 +02:00
rgarcia
45d2fdd201 adds available booths 2017-09-08 21:59:54 +02:00
taitus
4539c5fa00 Refactor and tests. 2017-09-05 12:52:14 +02:00
Senén Rodero Rodríguez
c92827e89e Add abilities to documentable authors and admins to create and destroy documents. 2017-08-25 17:27:37 +02:00