mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
729 B
20 lines
729 B
# frozen_string_literal: true
|
|
|
|
class Ability
|
|
include CanCan::Ability
|
|
|
|
def initialize(user)
|
|
can :manage, Template, account_id: user.account_id
|
|
can :manage, TemplateFolder, account_id: user.account_id
|
|
can :manage, Submission, template: { account_id: user.account_id }
|
|
can :manage, Submitter, template: { account_id: user.account_id }
|
|
can :manage, User, account_id: user.account_id
|
|
can :manage, EncryptedConfig, account_id: user.account_id
|
|
can :manage, EncryptedUserConfig, user_id: user.id
|
|
can :manage, AccountConfig, account_id: user.account_id
|
|
can :manage, UserConfig, user_id: user.id
|
|
can :manage, Account, id: user.account_id
|
|
can :manage, AccessToken, user_id: user.id
|
|
end
|
|
end
|