fix rendering of account groups when you don't have permission to manage them
test plan: * create an admin that has read roster permission only * as that user, you should be able to go to /accounts/X/groups, and not error Change-Id: I396d99f971cdbd2dd37b8e9a5a5d7ff578fe9667 Reviewed-on: https://gerrit.instructure.com/29009 Reviewed-by: Jacob Fugal <jacob@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> QA-Review: August Thornton <august@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
39a04729f9
commit
d0895ff7ad
|
@ -2,7 +2,7 @@
|
|||
|
||||
<% content_for :right_side do %>
|
||||
<div class="rs-margin-lr rs-margin-top">
|
||||
<% if @context.allow_student_organized_groups %>
|
||||
<% if @context.respond_to?(:allow_student_organized_groups) && @context.allow_student_organized_groups %>
|
||||
<% if can_do(@context.groups.new, @current_user, :create) %>
|
||||
<a href="#" class="btn button-sidebar-wide add_group_link icon-add"><%= t 'actions.add', 'Start a New Group' %></a>
|
||||
<% end %>
|
||||
|
|
|
@ -27,5 +27,12 @@ describe "/groups/context_groups" do
|
|||
render "groups/context_groups"
|
||||
response.should_not be_nil
|
||||
end
|
||||
|
||||
it "should render for an account" do
|
||||
view_context(Account.default)
|
||||
|
||||
render "groups/context_groups"
|
||||
response.should_not be_nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue