created comments with FactoryGirl
This commit is contained in:
parent
b6d726d40e
commit
eab2894fad
5 changed files with 17 additions and 3 deletions
|
|
@ -137,7 +137,9 @@ class Ability
|
|||
can :manage, Sponsor, conference_id: conf_ids_for_organizer
|
||||
can :manage, SponsorshipLevel, conference_id: conf_ids_for_organizer
|
||||
can :manage, Ticket, conference_id: conf_ids_for_organizer
|
||||
can :manage, Comment, conference_id: conf_ids_for_organizer
|
||||
can [:read, :create], Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(conference_id: conf_ids_for_organizer).pluck(:id)
|
||||
|
||||
end
|
||||
|
||||
def signed_in_with_cfp_role(user)
|
||||
|
|
@ -156,7 +158,8 @@ class Ability
|
|||
can :manage, CallForPaper, conference_id: conf_ids_for_cfp
|
||||
can :manage, Commercial, commercialable_type: 'Event',
|
||||
commercialable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
||||
can :manage, Comment, conference_id: conf_ids_for_cfp
|
||||
can [:read, :create], Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
||||
end
|
||||
|
||||
def signed_in_with_info_desk_role(user)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
%b.caret
|
||||
%ul.dropdown-menu
|
||||
= render 'layouts/user_menu'
|
||||
- if can? :manage, Comment
|
||||
- if can? :read, Comment
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "unread-comments-preview"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue