Module: Course::AchievementsAbilityComponent

Includes:
AbilityHost::Component
Defined in:
app/models/components/course/achievements_ability_component.rb

Instance Method Summary collapse

Instance Method Details

#define_permissionsObject


5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/components/course/achievements_ability_component.rb', line 5

def define_permissions
  if course_user
    allow_read_achievements
    allow_user_with_achievement_show_badges

    allow_read_draft_achievements_and_display_badge if course_user.staff?
    allow_manage_achievements if course_user.teaching_staff?
  end

  do_not_allow_award_automatically_awarded_achievements

  super
end