ability to share template with testing account

This commit is contained in:
Pete Matsyburka
2024-02-03 22:37:17 +02:00
parent 8630c68631
commit c67188edf8
25 changed files with 454 additions and 206 deletions
+7
View File
@@ -5,7 +5,14 @@ class Ability
def initialize(user)
can :manage, Template, account_id: user.account_id
can %i[read update create], Template,
Abilities::TemplateConditions.collection(user) do |template|
Abilities::TemplateConditions.entity(template, user:, ability: 'manage')
end
can :manage, TemplateFolder, account_id: user.account_id
can :manage, TemplateSharing, template: { account_id: user.account_id }
can :manage, Submission, account_id: user.account_id
can :manage, Submitter, submission: { account_id: user.account_id }
can :manage, User, account_id: user.account_id