Commit 01162e56 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

Merge branch 'fixes/volunteer_rights_on_ending_assignment_evaluation' into 'develop'

Fixes/volunteer rights on ending assignment evaluation

See merge request !806
parents 677705f0 a3cb44e7
Pipeline #23742 passed with stage
in 47 minutes and 44 seconds
......@@ -47,6 +47,7 @@ Metrics/LineLength:
Max: 100
Exclude:
- 'db/seeds.rb'
- 'app/policies/**/*'
Metrics/ClassLength:
Max: 150
Exclude:
......
......@@ -28,23 +28,17 @@ class AssignmentPolicy < ApplicationPolicy
alias_method :find_client?, :superadmin_or_department_manager?
alias_method :show_comments?, :superadmin_or_department_manager?
alias_method :show?,
:superadmin_or_department_manager_creation_or_volunteer_or_social_worker_related?
alias_method :edit?,
:superadmin_or_department_manager_creation?
alias_method :update?,
:superadmin_or_department_manager_creation?
alias_method :terminate?,
:superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :update_terminated_at?,
:superadmin_or_department_manager_creation?
alias_method :verify_termination?,
:superadmin?
alias_method :submit_feedback?,
:superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :last_submitted_hours_and_feedbacks?,
:superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :hours_and_feedbacks_submitted?,
:superadmin_or_department_manager_or_volunteer?
alias_method :show?, :superadmin_or_department_manager_creation_or_volunteer_or_social_worker_related?
alias_method :edit?, :superadmin_or_department_manager_creation?
alias_method :update?, :superadmin_or_department_manager_creation?
alias_method :verify_termination?, :superadmin?
alias_method :submit_feedback?, :superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :last_submitted_hours_and_feedbacks?, :superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :terminate?, :superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :update_terminated_at?, :superadmin_or_department_manager_creation_or_volunteer_related?
alias_method :hours_and_feedbacks_submitted?, :superadmin_or_department_manager_or_volunteer?
end
......@@ -5,25 +5,24 @@ class GroupAssignmentPolicy < ApplicationPolicy
end
end
alias_method :show?,
:superadmin_or_department_manager_or_volunteer_related?
# Actions related to collections
alias_method :terminated_index?, :superadmin_or_department_manager?
alias_method :hours_and_feedbacks_submitted?, :superadmin_or_department_manager_or_volunteer?
alias_method :create?, :superadmin_or_department_manager_offer?
alias_method :edit?, :superadmin_or_department_manager_offer?
alias_method :update?, :superadmin_or_department_manager_offer?
alias_method :set_end_today?, :superadmin_or_department_manager_offer?
alias_method :verify_termination?, :superadmin_or_department_manager_offer?
# Actions realted to creating a member
alias_method :create?, :superadmin_or_department_manager_offer?
alias_method :terminated_index?, :superadmin_or_department_manager?
# Actions related to editing a member
alias_method :edit?, :superadmin_or_department_manager_offer?
alias_method :update?, :superadmin_or_department_manager_offer?
alias_method :hours_and_feedbacks_submitted?,
:superadmin_or_department_manager_or_volunteer?
alias_method :last_submitted_hours_and_feedbacks?,
:superadmin_or_department_manager_or_volunteer_related?
alias_method :submit_feedback?, :superadmin_or_departments_offer_or_volunteer_related?
alias_method :update_terminated_at?, :superadmin_or_departments_offer_or_volunteer_related?
alias_method :set_end_today?, :superadmin_or_department_manager_offer?
alias_method :terminate?, :superadmin_or_departments_offer_or_volunteer_related?
alias_method :verify_termination?, :superadmin_or_department_manager_offer?
alias_method :update_terminated_at?, :superadmin_or_departments_offer_or_volunteer_related?
# Actions related to showing a member
alias_method :show?, :superadmin_or_department_manager_or_volunteer_related?
alias_method :last_submitted_hours_and_feedbacks?, :superadmin_or_department_manager_or_volunteer_related?
alias_method :show_comments?, :superadmin_or_department_manager?
alias_method :show_comments?, :superadmin_or_department_manager?
end
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