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

Support individual exemption deregistration #90

Merged
merged 38 commits into from
Mar 29, 2019

Conversation

eminnett
Copy link
Contributor

https://eaflood.atlassian.net/browse/RUBY-63

Add functionality to allow back office users to deregister individual exemptions. The feature includes the following functionality:

  • users can choose to ‘cease’ or ‘revoke’ an exemption
  • users must provide a reason before deregistering
  • only active exemptions can be deregistered
  • only super agents can do this

https://eaflood.atlassian.net/browse/RUBY-63

Add functionality to allow back office users to deregister individual exemptions. The feature includes the following functionality:

- users can choose to ‘cease’ or ‘revoke’ an exemption
- users must provide a reason before deregistering
- only active exemptions can be deregistered
- only super agents can do this
@eminnett eminnett added the enhancement New feature or request label Mar 15, 2019
@eminnett eminnett self-assigned this Mar 15, 2019
Copy link
Member

@irisfaraway irisfaraway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A handful of questions and suggestions - some of these we have talked about already (the CanCanCan stuff) but let me know what you think.

spec/models/registration_exemption_spec.rb Outdated Show resolved Hide resolved
app/services/deregistration_service.rb Outdated Show resolved Hide resolved
config/locales/forms/deregister_exemptions.en.yml Outdated Show resolved Hide resolved
app/forms/deregister_exemptions_form.rb Outdated Show resolved Hide resolved
spec/forms/deregister_exemptions_form_spec.rb Outdated Show resolved Hide resolved
app/controllers/deregister_exemptions_controller.rb Outdated Show resolved Hide resolved
app/controllers/deregister_exemptions_controller.rb Outdated Show resolved Hide resolved
@eminnett
Copy link
Contributor Author

eminnett commented Mar 25, 2019

I've realised the old system includes an "exemption_deregister_date". I will add this column to the DB as well as set it via an AASM call back.

@eminnett
Copy link
Contributor Author

@irisfaraway I had to add some code to the User model to be able to call can? on the current user inside the de-registration service (commit ed42b41). Are you happy with how this is done?

Copy link
Member

@irisfaraway irisfaraway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor comments. I am happy with the change to User though.

The AWS stuff also seems a bit out of place on this branch – is this to fix the issue from the dependency update? If so I'd rather we did it as a separate PR, merged to master and then updated this branch. I think this will make the history a lot cleaner.

@eminnett
Copy link
Contributor Author

The AWS related commits are simply the product of me trying to debug the S3 errors in Travis. Since the errors only showed up in Travis, I had to push the trial and error fixes. None of them worked so reverted the changes.

Next time I'll do that debugging in a separate branch. Hopefully pull/105 will fix the problem as the errors aren't showing up there.

@irisfaraway
Copy link
Member

@eminnett Oops, yes, can see they were getting reverted now (time for more coffee, I think). I'm OK with debugging happening on the same branch but I guess my preference is for removing the commits afterwards. Fingers crossed that 105 solves it though 🤞

@eminnett
Copy link
Contributor Author

No problem at all.

Copy link
Member

@irisfaraway irisfaraway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provisional approval for when the CI passes! (Give me a nudge if the review is voided and I'll hit the button again.)

@eminnett eminnett merged commit 197ba8f into master Mar 29, 2019
@eminnett eminnett deleted the support-individual-exemption-deregistration branch March 29, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants