Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valuators cannot reopen finished valuations #2518

Merged
merged 2 commits into from
Mar 8, 2018

Conversation

bertocq
Copy link
Collaborator

@bertocq bertocq commented Mar 6, 2018

References

This PR closes issue #2501
This PR is a production tested backport from Madrid's fork AyuntamientoMadrid#1337

Objectives

Valuators (that aren't admins) should not be able to reopen/edit an investment's finished valuation.

Visual Changes

How Admins see a finished valuation form

screen shot 2018-03-06 at 12 31 25

How non-admin Valuators see a finished valuation form

screen shot 2018-03-06 at 12 31 11

Notes

None

Valuators shouldn't be able to valuate an investment which valuation has
already been finished (only admins can)
Valuators should not be able to edit a finished valuation (only admins
should).

The valuation form is only shown to the valuator if he has that ability
(we've previously modified app/models/abilities/valuator.rb to be able
to rely on `valuate` over an investment to check that)

If the valuator can't see the form, we present him just the data in
plain text.
@bertocq bertocq merged commit 5745c4d into master Mar 8, 2018
@bertocq bertocq deleted the valuator_cannot_reopen_valuations branch March 8, 2018 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants