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

Allow managers to read investment suggestions #3711

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Sep 20, 2019

References

Closes #3660

Background

When creating a budget investment with an unverified manager (for example, a manager who isn't part of the local census), there's a request to Budgets::InvestmentsController#suggest. Since the manager isn't verified, suggestions can't be obtained.

Objectives

Make suggestions for budget investments in the management section show up normally.

Visual Changes

Before these changes:

Message denying permissin
A whole web page loaded where suggestions should be

After these changes:

Suggestions are inserted below the title

When creating a budget investment with an unverified manager (for
example, a manager who isn't part of the local census), there's a
request to `Budgets::InvestmentsController#suggest`. Since the manager
isn't verified, suggestions can't be obtained.

There are serveral ways to fix this problem:

* Add a `suggest` action to Management::Budgets::InvestmentsController,
doing the same thing the main `suggest` action does.
* Give unverified users permission to access investment suggestions
* Give managers permission to access investment suggestions

I've chosen the last one because I thought it was simple and only
changed existing behaviour for managers, but any other solution would be
as valid. I haven't added the `phase: "accepting"` condition to keep it
simple, since a read-only action like this one in the management portal
isn't gonna create security risks.
@javierm javierm self-assigned this Sep 20, 2019
@javierm javierm added this to Reviewing in Roadmap via automation Sep 20, 2019
@javierm javierm added Coadministration Management, Moderation and Valuation Bug labels Sep 20, 2019
@javierm javierm merged commit 989b2e2 into master Sep 24, 2019
@javierm javierm deleted the fix_managers_suggestions branch September 24, 2019 12:32
Roadmap automation moved this from Reviewing to Release 1.1.0 Sep 24, 2019
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
…estions

Allow managers to read investment suggestions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Coadministration Management, Moderation and Valuation Flaky bug
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

Broken investment suggestions for unverified managers
1 participant