# Pull Request Template ## Description This PR will replace the upgrade banner with an upgrade page view. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? ### Loom video https://www.loom.com/share/0f2b4b09acdd4404bf3211184a470227?sid=7ed60a99-0299-4642-b907-2af8c4dcc643 ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Pranav <pranavrajs@gmail.com>
30 lines
489 B
Ruby
30 lines
489 B
Ruby
class AccountPolicy < ApplicationPolicy
|
|
def show?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def cache_keys?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def limits?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def update?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def update_active_at?
|
|
true
|
|
end
|
|
|
|
def subscription?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def checkout?
|
|
@account_user.administrator?
|
|
end
|
|
end
|