@@ -49,6 +49,7 @@ defmodule CodeCorps.Policy do
4949 % OrganizationGithubAppInstallation { } = organization_github_app_installation , % { } ) ,
5050 do: Policy.OrganizationGithubAppInstallation . delete? ( user , organization_github_app_installation )
5151 defp can? ( % User { } = user , :create , % OrganizationGithubAppInstallation { } , % { } = params ) , do: Policy.OrganizationGithubAppInstallation . create? ( user , params )
52+ defp can? ( % User { } = current_user , :create , % Preview { } , % { } = params ) , do: Policy.Preview . create? ( current_user , params )
5253 defp can? ( % User { } = current_user , :create , % ProjectCategory { } , % { } = params ) , do: Policy.ProjectCategory . create? ( current_user , params )
5354 defp can? ( % User { } = current_user , :delete , % ProjectCategory { } = project_category , % { } ) , do: Policy.ProjectCategory . delete? ( current_user , project_category )
5455 defp can? ( % User { } = current_user , :create , % ProjectGithubRepo { } , % { } = params ) , do: Policy.ProjectGithubRepo . create? ( current_user , params )
@@ -105,8 +106,6 @@ defmodule CodeCorps.Policy do
105106
106107 def can? ( % User { } = user , :create , % Changeset { data: % GithubAppInstallation { } } = changeset ) , do: Policy.GithubAppInstallation . create? ( user , changeset )
107108
108- def can? ( % User { } = user , :create , % Changeset { data: % Preview { } } = changeset ) , do: Policy.Preview . create? ( user , changeset )
109-
110109 def can? ( % User { } = user , :create , Role ) , do: Policy.Role . create? ( user )
111110 end
112111end
0 commit comments