Allowing users to see member activity
This commit is contained in:
parent
a2a9d082d8
commit
aa29f30f30
|
@ -14,8 +14,8 @@ class Ability
|
||||||
can [:update], Mac, :user_id => nil
|
can [:update], Mac, :user_id => nil
|
||||||
can [:create,:update], Mac, :user_id => user.id
|
can [:create,:update], Mac, :user_id => user.id
|
||||||
can :read, Payment, :user_id => user.id
|
can :read, Payment, :user_id => user.id
|
||||||
can [:read,:new_member_report], User, :id => user.id #TODO: why can users update themselves? Maybe because Devise doesn't check users/edit?
|
|
||||||
can :read, UserCertification, :user_id => user.id
|
can :read, UserCertification, :user_id => user.id
|
||||||
|
can :read, User, :id => user.id #TODO: why can users update themselves? Maybe because Devise doesn't check users/edit?
|
||||||
can :compose_email, User
|
can :compose_email, User
|
||||||
can :send_email, User
|
can :send_email, User
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class Ability
|
||||||
end
|
end
|
||||||
# Users can see others' stuff if they've been oriented
|
# Users can see others' stuff if they've been oriented
|
||||||
unless user.orientation.blank?
|
unless user.orientation.blank?
|
||||||
can :read, User, :hidden => [nil,false]
|
can [:read,:new_member_report,:activity], User, :hidden => [nil,false]
|
||||||
can :read, UserCertification
|
can :read, UserCertification
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,13 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if current_user.admin? %>
|
<% if current_user.admin? %>
|
||||||
<%= link_to 'Inactive Users', users_inactive_path %> |
|
<%= link_to 'Inactive Users', users_inactive_path %> |
|
||||||
|
<% end %>
|
||||||
|
<% if can? :activity, User %>
|
||||||
<%= link_to 'Recent Activity', users_activity_path %> |
|
<%= link_to 'Recent Activity', users_activity_path %> |
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to 'New Members Report', users_new_member_report_path %>
|
<% if can? :new_member_report, User %>
|
||||||
|
<%= link_to 'New Members Report', users_new_member_report_path %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% @certifications = Certification.all.sort_by(&:id) %>
|
<% @certifications = Certification.all.sort_by(&:id) %>
|
||||||
<table>
|
<table>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user