Commit f09d4617 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Change Vulnerabilities::ExportPolicy to refer to expoortable

parent c8356813
......@@ -2,10 +2,10 @@
module Vulnerabilities
class ExportPolicy < BasePolicy
delegate { @subject.project }
delegate { @subject.exportable }
condition(:is_author) { @user && @subject.author == @user }
condition(:exportable) { can?(:create_vulnerability_export, @subject.project) }
condition(:exportable) { can?(:create_vulnerability_export, @subject.exportable) }
rule { exportable & is_author }.policy do
enable :read_vulnerability_export
......
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