Skip to content

Commit

Permalink
Merge branch 'hotfix/5.5.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp committed Jun 29, 2022
2 parents 3ccc779 + fd57d33 commit 0bd7dc3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/policies/series_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def index?
def show?
return true if course_admin?
return false if record.closed?
return false if record.hidden? && user.nil?
return false if record.hidden? && !user&.subscribed_courses&.include?(record.course)

course = record.course
course.visible_for_all? ||
Expand Down
2 changes: 0 additions & 2 deletions app/views/activities/_series_activities_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
<td>
<% if activity.accessible?(current_user, @course) %>
<%= link_to activity.name, get_activity_path.call(activity) %>
<% elsif activity.access_public? %>
<%= link_to activity.name, activity_path(activity) %>
<% else %>
<%= activity.name %>
<% if current_user&.course_admin?(@course) && current_user&.repository_admin?(activity.repository) %>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/00_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Application
module Version
MAJOR = 5
MINOR = 5
PATCH = 7
PATCH = 8

STRING = [MAJOR, MINOR, PATCH].compact.join('.')
end
Expand Down
4 changes: 2 additions & 2 deletions test/controllers/series_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ def assert_show_and_overview(authorized, token: nil)
assert_show_and_overview false
end

test 'student should see hidden series with token' do
test 'unsubscribed student should not see hidden series, even with token' do
sign_in @student
@series.update(visibility: :hidden)
assert_show_and_overview true, token: @series.access_token
assert_show_and_overview false, token: @series.access_token
end

test 'student should not see hidden series with wrong token' do
Expand Down

0 comments on commit 0bd7dc3

Please sign in to comment.