From 21aa8c95d6763c721bc8dd5ce055ec520f7910c7 Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Mon, 5 Jul 2021 13:21:21 -0700 Subject: [PATCH] Fix: Metrics/CyclomaticComplexity. --- app/models/ability.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 5d3e0ee4..c8352cd2 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -54,7 +54,7 @@ def initialize(user) end # Admins and Staff share a few special abilities - if user.admin? or user.role == 'S' or user.director? then + if %w[D S U].include?(user.role) then can :print_official_docs, User, :year => user.year can :check_in, :attendee can :read, :report