Commit 5ac7286c authored by Aakriti Gupta's avatar Aakriti Gupta Committed by Douglas Barbosa Alexandre

Break down condition

parent 5dd35c17
...@@ -21,7 +21,8 @@ class Analytics::ApplicationController < ApplicationController ...@@ -21,7 +21,8 @@ class Analytics::ApplicationController < ApplicationController
def check_feature_availability!(feature) def check_feature_availability!(feature)
return render_403 unless ::License.feature_available?(feature) return render_403 unless ::License.feature_available?(feature)
return render_403 if @group && !@group.root_ancestor.feature_available?(feature) return unless @group
return render_403 unless @group.root_ancestor.feature_available?(feature)
end end
def load_group def load_group
......
Markdown is supported
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