Skip to content

alexkalinin-stackoverflow-examples/q45113760-user-role-information-in-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

question

Solutions

See Pull Requests diffs and it's branches to view solution.

Setup

bundle install
rake db:create db:migrate db:seed 
rails server

Test

rspec

Documentation

rake db:seed will create 3 users with different roles:

  • [email protected] with password 123123123 - can read everybodie's post. Cannot create or delete any.
  • [email protected] with password 123123123 - can create/update/delete own posts. Cannot read/update/delete foreign.
  • [email protected] with password 123123123 - can do everything.

See spec/controllers/posts_controller_spec.rb test for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published