Commit 4195eb9a authored by Jiri Strojil's avatar Jiri Strojil
Browse files

Added auths

parent 2db81737
Pipeline #29214 failed with stage
in 44 minutes and 25 seconds
class SemesterProcessVolunteersController < ApplicationController
before_action :skip_authorization #TODO add auth
before_action :prepare_review, only: [:review_semester, :submit_review]
before_action :initialize_feedback, only: [:review_semester, :submit_review]
......@@ -40,7 +39,7 @@ class SemesterProcessVolunteersController < ApplicationController
@hours = @semester_process_volunteer.hours
@volunteer = @semester_process_volunteer.volunteer
@mission = @semester_process_volunteer.missions.first
# TODO auths
authorize @semester_process_volunteer
end
def review_params
......
......@@ -9,6 +9,7 @@ class SemesterProcessVolunteerPolicy < ApplicationPolicy
# Actions
alias_method :index?, :superadmin?
alias_method :review_semester?, :superadmin?
alias_method :submit_review?, :superadmin?
alias_method :new?, :superadmin?
alias_method :show?, :superadmin?
alias_method :edit?, :superadmin?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment