fix tempalte clone roles

This commit is contained in:
Pete Matsyburka authored and Oleksandr Turchyn committed 2024-09-30 12:13:07 +03:00
1 parent c6b004f107
commit 0c039ee64f
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -116,7 +116,8 @@ class TemplatesController < ApplicationController
end
def authorized_clone_account_id?(account_id)
true_user.account_id.to_s == account_id.to_s || true_user.account.linked_accounts.exists?(id: account_id)
true_user.account_id.to_s == account_id.to_s ||
true_user.account.linked_accounts.accessible_by(current_ability).exists?(id: account_id)
end
def maybe_redirect_to_template(template)