Skip to content

Commit d115e93

Browse files
committed
Always allow the exercises endpoinAlways allow the exercises endpointt
1 parent 06f1480 commit d115e93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/api/v8/organizations/courses/exercises_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ def index
7676

7777
def show
7878
unauthorize_guest!
79+
authorization_skip!
7980
organization = Organization.find_by!(slug: params[:organization_slug])
8081
course = organization.courses.find_by(name: "#{params[:organization_slug]}-#{params[:course_name]}")
8182
course = organization.courses.find_by!(name: params[:course_name]) unless course
8283
ex = course.exercises.find_by!(name: params[:name])
83-
authorize! :read, ex
8484

8585
model_solution_token_used_on_this_exercise = tokens_used = ModelSolutionTokenUsed.where(user: current_user, course: course, exercise_name: ex.name).count > 0
8686

0 commit comments

Comments
 (0)