Skip to content

Commit

Permalink
Added some abilities to ability model.
Browse files Browse the repository at this point in the history
  • Loading branch information
seaneshbaugh committed Jul 4, 2016
1 parent 76c0968 commit 35d4d1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ class Ability
include CanCan::Ability

def initialize(user)
if user.admin?
can :manage, :all
else
can :read, :all
end

# Define abilities for the passed in user here. For example:
#
# user ||= User.new # guest user (not logged in)
Expand Down

0 comments on commit 35d4d1b

Please sign in to comment.