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

Remove Clearance from UsersController. #4201

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Remove Clearance from UsersController. #4201

merged 1 commit into from
Dec 30, 2023

Conversation

simi
Copy link
Member

@simi simi commented Nov 12, 2023

  • it is not used, since it is overridden

idea behind

Clearance seems not used as originally intended currently. It is based around email/password and provides various helpers. But some of them were already merged into Rails and some of them doesn't work anymore for RubyGems.org since MFA/OTP/WebAuthN... Considering it is sometimes blocking upgrades (thoughtbot/clearance#995) it is IMHO good time to reconsider its usage. At various places it is already overridden and not used.

I do kick-off with off-boarding Clearance from UsersController. Is is possible to also remove include Clearance::Authorization from ApplicationController since it is useful only for redirect_back_or helper which is already present in Rails these days as redirect_back_or_to. In following PRs I would like to address other controllers and finally the User model.

@simi simi requested a review from segiddins November 12, 2023 00:58
Copy link

codecov bot commented Nov 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bf6aa45) 98.73% compared to head (4b449ba) 98.73%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4201   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files         336      336           
  Lines        7416     7417    +1     
=======================================
+ Hits         7322     7323    +1     
  Misses         94       94           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@simi simi force-pushed the clearance-sunset-1 branch 3 times, most recently from edde9f6 to b414ef0 Compare November 12, 2023 01:30
app/controllers/sessions_controller.rb Show resolved Hide resolved
app/controllers/users_controller.rb Outdated Show resolved Hide resolved
app/controllers/users_controller.rb Show resolved Hide resolved
@segiddins
Copy link
Member

@simi what's the status on this?

@simi
Copy link
Member Author

simi commented Dec 7, 2023

@simi what's the status on this?

I'll fix #4201 (comment) for now and I'm happy to merge.

- it is not used, since it is overridden
@simi simi force-pushed the clearance-sunset-1 branch from b414ef0 to 4b449ba Compare December 20, 2023 01:54
@simi simi requested a review from segiddins December 20, 2023 01:55
@simi simi merged commit 8ce6c46 into master Dec 30, 2023
16 checks passed
@simi simi deleted the clearance-sunset-1 branch December 30, 2023 02:29
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.

2 participants