@@ -30,36 +30,37 @@ defmodule CodeCorps.Policy do
3030 defp can? ( % User { } = current_user , :create , % DonationGoal { } , % { } = params ) , do: Policy.DonationGoal . create? ( current_user , params )
3131 defp can? ( % User { } = current_user , :update , % DonationGoal { } = donation_goal , % { } ) , do: Policy.DonationGoal . update? ( current_user , donation_goal )
3232 defp can? ( % User { } = current_user , :delete , % DonationGoal { } = donation_goal , % { } ) , do: Policy.DonationGoal . delete? ( current_user , donation_goal )
33+ defp can? ( % User { } = current_user , :create , % GithubAppInstallation { } , % { } = params ) , do: Policy.GithubAppInstallation . create? ( current_user , params )
3334 defp can? ( % User { } = current_user , :create , % Organization { } , % { } ) , do: Policy.Organization . create? ( current_user )
3435 defp can? ( % User { } = current_user , :update , % Organization { } = organization , % { } ) , do: Policy.Organization . update? ( current_user , organization )
35- defp can? ( % User { } = current_user , :update , % User { } = user , % { } ) , do: Policy.User . update? ( current_user , user )
36- defp can? ( % User { } = current_user , :create , % Task { } , % { } = params ) , do: Policy.Task . create? ( current_user , params )
37- defp can? ( % User { } = current_user , :update , % Task { } = task , % { } ) , do: Policy.Task . update? ( current_user , task )
38- defp can? ( % User { } = current_user , :create , % UserTask { } , % { } = params ) , do: Policy.UserTask . create? ( current_user , params )
39- defp can? ( % User { } = current_user , :update , % UserTask { } = user_task , % { } ) , do: Policy.UserTask . update? ( current_user , user_task )
40- defp can? ( % User { } = current_user , :delete , % UserTask { } = user_task , % { } ) , do: Policy.UserTask . delete? ( current_user , user_task )
41- defp can? ( % User { } = current_user , :create , % Project { } , % { } = params ) , do: Policy.Project . create? ( current_user , params )
42- defp can? ( % User { } = current_user , :update , % Project { } = project , % { } ) , do: Policy.Project . update? ( current_user , project )
43- defp can? ( % User { } = current_user , :create , % ProjectSkill { } , % { } = params ) , do: Policy.ProjectSkill . create? ( current_user , params )
44- defp can? ( % User { } = current_user , :delete , % ProjectSkill { } = project_skill , % { } ) , do: Policy.ProjectSkill . delete? ( current_user , project_skill )
45- defp can? ( % User { } = current_user , :create , % ProjectUser { } , % { } = params ) , do: Policy.ProjectUser . create? ( current_user , params )
46- defp can? ( % User { } = current_user , :update , % ProjectUser { } = project_user , % { } = params ) , do: Policy.ProjectUser . update? ( current_user , project_user , params )
47- defp can? ( % User { } = current_user , :delete , % ProjectUser { } = project_user , % { } ) , do: Policy.ProjectUser . delete? ( current_user , project_user )
36+ defp can? ( % User { } = current_user , :delete , % OrganizationGithubAppInstallation { } = organization_github_app_installation , % { } ) ,
37+ do: Policy.OrganizationGithubAppInstallation . delete? ( current_user , organization_github_app_installation )
38+ defp can? ( % User { } = current_user , :create , % OrganizationGithubAppInstallation { } , % { } = params ) , do: Policy.OrganizationGithubAppInstallation . create? ( current_user , params )
4839 defp can? ( % User { } = current_user , :create , % OrganizationInvite { } , % { } ) , do: Policy.OrganizationInvite . create? ( current_user )
49- defp can? ( % User { } = current_user , :update , % OrganizationInvite { } = _invite , % { } ) , do: Policy.OrganizationInvite . update? ( current_user )
50- defp can? ( % User { } = user , :delete ,
51- % OrganizationGithubAppInstallation { } = organization_github_app_installation , % { } ) ,
52- do: Policy.OrganizationGithubAppInstallation . delete? ( user , organization_github_app_installation )
53- defp can? ( % User { } = user , :create , % OrganizationGithubAppInstallation { } , % { } = params ) , do: Policy.OrganizationGithubAppInstallation . create? ( user , params )
40+ defp can? ( % User { } = current_user , :update , % OrganizationInvite { } , % { } ) , do: Policy.OrganizationInvite . update? ( current_user )
5441 defp can? ( % User { } = current_user , :create , % Preview { } , % { } = params ) , do: Policy.Preview . create? ( current_user , params )
42+ defp can? ( % User { } = current_user , :create , % Project { } , % { } = params ) , do: Policy.Project . create? ( current_user , params )
43+ defp can? ( % User { } = current_user , :update , % Project { } = project , % { } ) , do: Policy.Project . update? ( current_user , project )
5544 defp can? ( % User { } = current_user , :create , % ProjectCategory { } , % { } = params ) , do: Policy.ProjectCategory . create? ( current_user , params )
5645 defp can? ( % User { } = current_user , :delete , % ProjectCategory { } = project_category , % { } ) , do: Policy.ProjectCategory . delete? ( current_user , project_category )
5746 defp can? ( % User { } = current_user , :create , % ProjectGithubRepo { } , % { } = params ) , do: Policy.ProjectGithubRepo . create? ( current_user , params )
5847 defp can? ( % User { } = current_user , :delete , % ProjectGithubRepo { } = project_github_repo , % { } ) ,
5948 do: Policy.ProjectGithubRepo . delete? ( current_user , project_github_repo )
49+ defp can? ( % User { } = current_user , :create , % ProjectSkill { } , % { } = params ) , do: Policy.ProjectSkill . create? ( current_user , params )
50+ defp can? ( % User { } = current_user , :delete , % ProjectSkill { } = project_skill , % { } ) , do: Policy.ProjectSkill . delete? ( current_user , project_skill )
51+ defp can? ( % User { } = current_user , :create , % ProjectUser { } , % { } = params ) , do: Policy.ProjectUser . create? ( current_user , params )
52+ defp can? ( % User { } = current_user , :update , % ProjectUser { } = project_user , % { } = params ) , do: Policy.ProjectUser . update? ( current_user , project_user , params )
53+ defp can? ( % User { } = current_user , :delete , % ProjectUser { } = project_user , % { } ) , do: Policy.ProjectUser . delete? ( current_user , project_user )
6054 defp can? ( % User { } = current_user , :create , % Role { } , % { } ) , do: Policy.Role . create? ( current_user )
6155 defp can? ( % User { } = current_user , :create , % RoleSkill { } , % { } ) , do: Policy.RoleSkill . create? ( current_user )
6256 defp can? ( % User { } = current_user , :delete , % RoleSkill { } , % { } ) , do: Policy.RoleSkill . delete? ( current_user )
57+ defp can? ( % User { } = current_user , :create , % Skill { } , % { } ) , do: Policy.Skill . create? ( current_user )
58+ defp can? ( % User { } = current_user , :show , % StripeConnectAccount { } = stripe_connect_account , % { } ) ,
59+ do: Policy.StripeConnectAccount . show? ( current_user , stripe_connect_account )
60+ defp can? ( % User { } = current_user , :create , % StripeConnectAccount { } , % { } = params ) ,
61+ do: Policy.StripeConnectAccount . create? ( current_user , params )
62+ defp can? ( % User { } = current_user , :update , % StripeConnectAccount { } = stripe_connect_account , % { } ) ,
63+ do: Policy.StripeConnectAccount . update? ( current_user , stripe_connect_account )
6364 defp can? ( % User { } = current_user , :show , % StripeConnectPlan { } = stripe_connect_plan , % { } ) ,
6465 do: Policy.StripeConnectPlan . show? ( current_user , stripe_connect_plan )
6566 defp can? ( % User { } = current_user , :create , % StripeConnectPlan { } , % { } = params ) ,
@@ -68,25 +69,26 @@ defmodule CodeCorps.Policy do
6869 do: Policy.StripeConnectSubscription . show? ( current_user , stripe_connect_subscription )
6970 defp can? ( % User { } = current_user , :create , % StripeConnectSubscription { } , % { } = params ) ,
7071 do: Policy.StripeConnectSubscription . create? ( current_user , params )
71- defp can? ( % User { } = current_user , :create , % Skill { } , % { } ) , do: Policy.Skill . create? ( current_user )
7272 defp can? ( % User { } = current_user , :show , % StripePlatformCard { } = stripe_platform_card , % { } ) ,
7373 do: Policy.StripePlatformCard . show? ( current_user , stripe_platform_card )
7474 defp can? ( % User { } = current_user , :create , % StripePlatformCard { } , % { } = params ) ,
7575 do: Policy.StripePlatformCard . create? ( current_user , params )
76+ defp can? ( % User { } = current_user , :create , % StripePlatformCustomer { } , % { } = params ) ,
77+ do: Policy.StripePlatformCustomer . create? ( current_user , params )
78+ defp can? ( % User { } = current_user , :show , % StripePlatformCustomer { } = stripe_platform_customer , % { } ) ,
79+ do: Policy.StripePlatformCustomer . show? ( current_user , stripe_platform_customer )
80+ defp can? ( % User { } = current_user , :create , % Task { } , % { } = params ) , do: Policy.Task . create? ( current_user , params )
81+ defp can? ( % User { } = current_user , :update , % Task { } = task , % { } ) , do: Policy.Task . update? ( current_user , task )
7682 defp can? ( % User { } = current_user , :create , % TaskSkill { } , % { } = params ) , do: Policy.TaskSkill . create? ( current_user , params )
7783 defp can? ( % User { } = current_user , :delete , % TaskSkill { } = task_skill , % { } ) , do: Policy.TaskSkill . delete? ( current_user , task_skill )
84+ defp can? ( % User { } = current_user , :update , % User { } = user , % { } ) , do: Policy.User . update? ( current_user , user )
7885 defp can? ( % User { } = current_user , :create , % UserCategory { } = user_category , % { } ) , do: Policy.UserCategory . create? ( current_user , user_category )
7986 defp can? ( % User { } = current_user , :delete , % UserCategory { } = user_category , % { } ) , do: Policy.UserCategory . delete? ( current_user , user_category )
80- defp can? ( % User { } = current_user , :create , % UserSkill { } , % { } = params ) , do: Policy.UserSkill . create? ( current_user , params )
81- defp can? ( % User { } = current_user , :delete , % UserSkill { } = user_skill , % { } ) , do: Policy.UserSkill . delete? ( current_user , user_skill )
8287 defp can? ( % User { } = current_user , :create , % UserRole { } = user_role , % { } ) , do: Policy.UserRole . create? ( current_user , user_role )
8388 defp can? ( % User { } = current_user , :delete , % UserRole { } = user_role , % { } ) , do: Policy.UserRole . delete? ( current_user , user_role )
84- defp can? ( % User { } = user , :show , % StripeConnectAccount { } = stripe_connect_account , % { } ) , do: Policy.StripeConnectAccount . show? ( user , stripe_connect_account )
85- defp can? ( % User { } = user , :create , % StripeConnectAccount { } , % { } = params ) , do: Policy.StripeConnectAccount . create? ( user , params )
86- defp can? ( % User { } = user , :update , % StripeConnectAccount { } = stripe_connect_account , % { } ) , do: Policy.StripeConnectAccount . update? ( user , stripe_connect_account )
87- defp can? ( % User { } = current_user , :create , % StripePlatformCustomer { } , % { } = params ) ,
88- do: Policy.StripePlatformCustomer . create? ( current_user , params )
89- defp can? ( % User { } = current_user , :show , % StripePlatformCustomer { } = stripe_platform_customer , % { } ) ,
90- do: Policy.StripePlatformCustomer . show? ( current_user , stripe_platform_customer )
91- defp can? ( % User { } = user , :create , % GithubAppInstallation { } , % { } = params ) , do: Policy.GithubAppInstallation . create? ( user , params )
89+ defp can? ( % User { } = current_user , :create , % UserSkill { } , % { } = params ) , do: Policy.UserSkill . create? ( current_user , params )
90+ defp can? ( % User { } = current_user , :delete , % UserSkill { } = user_skill , % { } ) , do: Policy.UserSkill . delete? ( current_user , user_skill )
91+ defp can? ( % User { } = current_user , :create , % UserTask { } , % { } = params ) , do: Policy.UserTask . create? ( current_user , params )
92+ defp can? ( % User { } = current_user , :update , % UserTask { } = user_task , % { } ) , do: Policy.UserTask . update? ( current_user , user_task )
93+ defp can? ( % User { } = current_user , :delete , % UserTask { } = user_task , % { } ) , do: Policy.UserTask . delete? ( current_user , user_task )
9294end
0 commit comments