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

Milestone 9: add devise #9

Merged
merged 22 commits into from
Dec 14, 2023
Merged

Milestone 9: add devise #9

merged 22 commits into from
Dec 14, 2023

Conversation

ITurres
Copy link
Owner

@ITurres ITurres commented Dec 13, 2023

Pull Request Summary for Milestone 9 Completion


Added:

/app/devise/*

  • @ITurres && @demesameneshoa: We have added the devise gem to the project.

  • We have modified the usual devise files to fit the project needs, that includes:

    • modified views. (Updated: now with confirmable)
    • modified partials. (Updated: now with confirmable)
    • modified controllers.
    • modified environments.
    • modified routes.
    • modified models. (Updated: now with confirmable)
    • Added migrations. (Updated: now with confirmable)
    • Regenerate schema. (Updated: now with confirmable)

    Please see here for further details

/app/views/layouts/_navbar.html.erb

  • @ITurres: I have added a navbar partial to display the app logo and the sign out link as long as the user is logged in.

/app/views/layouts/_back_button.html.erb

  • @ITurres: I have added a back button partial to display a back button as long as the current page is not root.

Modified:

/README.md

/app/models/user.rb

  • @ITurres: Apart form the devise modifications, I have added a private set_default_photo method to set a default random photo to the user before creation.

  • Marked the devise task as completed.

/app/views/layouts/application.html.erb

  • @ITurres: now the navbar partial is being rendered, and the back_button.

`/app/views/shared/_user_card.html.erb

  • @ITurres: I have modified/added bootstrap classes to the user card.

Thank you for reviewing this PR. Feel free to reach out on Slack as Arturo (Arthur) Emanuel Guerra Iturres for any queries or further assistance. 🌟

ITurres and others added 18 commits December 13, 2023 15:13
- Modified: Gemfile
- Modified: Gemfile.lock
- Added: app/views/devise/*
- Added: config/initializers/devise.rb
- Added: config/locales/devise.en.yml
- Added: db/migrate/20231213164642_add_devise_to_users.rb
…ization

Implemented Devise authentication and parameter handling
in ApplicationController:

- Enforced user authentication across the app with
  `before_action :authenticate_user!`.
- Protected against CSRF attacks with `protect_from_forgery
  with: :exception`.
- Implemented strong parameters for user attributes in sign-up,
  updates, and sign-in.
- Modified: passwords/new.html.erb
- Modified: registrations/new.html.erb
- Modified: sessions/new.html.erb
- Modified: shared/_links.html.erb
@ITurres ITurres added documentation Improvements or additions to documentation enhancement New feature or request UI Views UI labels Dec 13, 2023
@ITurres ITurres marked this pull request as ready for review December 13, 2023 21:58
Copy link

@Shedrack-Sunday Shedrack-Sunday left a comment

Choose a reason for hiding this comment

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

Hello @ITurres 👋

CHANGES REQUIRED ♻️

Impressive work on the project so far👏
You've done extremely well so far in this project, However, there are some adjustments you need to make to move to the next project. 💯

Highlights

  • Good use of GitHub features ✔️
  • Nice work with Devise features ✔️
  • Great work on the Authorization implementation 👏

- Required Changes 🌵

  • Kindly note the comment i made regarding the issues on enabling the :onfirmable feature to make sure signup is confirmed

Optional suggestions

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing really improves your application.

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Comment on lines 2 to 3
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
Copy link

@Shedrack-Sunday Shedrack-Sunday Dec 13, 2023

Choose a reason for hiding this comment

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

  • Kindly enable :confirmable to make it possible to get a confirmation after login 👍

Requirement:

image

Comment on lines 21 to 26

## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
Copy link

@Shedrack-Sunday Shedrack-Sunday Dec 13, 2023

Choose a reason for hiding this comment

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

  • Do well to uncomment this section, to make sure the confirmable configuration works 👍

@ITurres
Copy link
Owner Author

ITurres commented Dec 13, 2023

Holly Molly, we have overlooked that @demesameneshoa ! 🥲

Hi @Shedrack-Sunday! thank you so much for having reviewed this PR! You are right!, We'll fix it right away 🎯
We'll also make sure to modify the views to math the current design.

Thank you again! 🥂

Copy link

@V-Blaze V-Blaze left a comment

Choose a reason for hiding this comment

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

Hi @ITurres, @demesameneshoa

Approved 🟢 🟢

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
giphy

Highlights

  • Devise setup correctly 💯
  • Great communication with reviewer👍
  • Correct git flow🟢 👍

Optional suggestions

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@ITurres
Copy link
Owner Author

ITurres commented Dec 14, 2023

Wow great! 🥳. Thank you @V-Blaze! We both wish you a great week! thank you for reviewing the PR.

@ITurres ITurres merged commit 189bf68 into development Dec 14, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request UI Views UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants