Skip to content

Instantly share code, notes, and snippets.

@scottmessinger
Created May 3, 2012 20:05
Show Gist options
  • Save scottmessinger/2588869 to your computer and use it in GitHub Desktop.
Save scottmessinger/2588869 to your computer and use it in GitHub Desktop.
invites
class Ability
include CanCan::Ability
def employee_abilities(user)
# [ code ]
# I imagine the invite abilities being set just like the group
# viewer abilities and supervisor abilities are set now.
supervisor_abilities(user) if user.employee.supervisor?
group_viewer_abilities(user)
invite_abilities(user)
end
def invite_abilities(user)
# [ code ]
end
end
Invites
user_id
invited_user_id
permission_level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment