README.md in effective_learndash-0.1.3 vs README.md in effective_learndash-0.1.4
- old
+ new
@@ -72,9 +72,15 @@
```ruby
can(:show, Effective::LearndashUser) { |lduser| lduser.owner_id == user.id }
can(:index, Effective::LearndashEnrollment)
+can([:index, :show], Effective::LearndashCourse) { |course| !course.draft? }
+can([:show, :index], Effective::CourseRegistrant) { |registrant| registrant.owner == user || registrant.owner.blank? }
+can([:new, :create], EffectiveLearndash.CourseRegistration)
+can([:show, :index], EffectiveLearndash.CourseRegistration) { |registration| registration.owner == user }
+can([:update, :destroy], EffectiveLearndash.CourseRegistration) { |registration| registration.owner == user && !registration.was_submitted? }
+
if user.admin?
can :admin, :effective_learndash
can(crud + [:refresh], Effective::LearndashUser)
can(crud + [:refresh], Effective::LearndashCourse)