Giter Site home page Giter Site logo

railbender's Introduction

<<<<<<< HEAD == README

This README would normally document whatever steps are necessary to get the application up and running.

Things you may want to cover:

  • Ruby version

  • System dependencies

  • Configuration

  • Database creation

  • Database initialization

  • How to run the test suite

  • Services (job queues, cache servers, search engines, etc.)

  • Deployment instructions

  • ...

Please feel free to use a different markup language if you do not plan to run rake doc:app.

P3 Sinatra Authentication And Authorization

##Learning Competencies

  • Implement user login and authentication.

##Summary

Using Sinatra, create a user signin/signup and authenticate signed in users before displaying information. Start from the skeleton in the authentication directory which contains a shell of database, views and controllers.

##Releases

###Release 0: Implement Sign In

Modify the skeleton code to achieve the following functionality:

  1. A user can sign up for a new account with an email and password.
  2. An existing user can sign in
  3. If a user is not signed in, they only see a welcome message on the home page.
  4. If a user is signed in, they can see all users on the home page.
  5. A user can sign out using the provided delete route which is from a hidden field in the form.
  6. A helper method current_user returns the current signed in user and is used to display appropriate sign in / sign out portions of the view. (This logic is already implemented in the view - you just need to finish the helper method).

###Release 1: Encryption

Storing passwords is a serious business, and you should always take steps to keep that information secure. User passwords should be encrypted and stored in a password-hash field. You may implement this yourself or use the bcyrpt gem.

###Release 2: Validation (optional) Demonstrate model validation, error messages, and user access levels.

  • Add validation to the user model including password length and appropriately formated email.
  • Display appropriate error messages to the user for invalid data. Add a field to store user access level (Admin / Student) and limit functionality to different users leves. (ie an Admin can edit users but a Student can only see other users).

##Resources

12e6a3580a74f43e45ad834bef045f9e7d88bf88

railbender's People

Contributors

jzuiches avatar aespaldi avatar ndelage avatar johana-star avatar raorao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.