mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
12 lines
431 B
Ruby
12 lines
431 B
Ruby
class ExtendedContentAuthorizer < ContentAuthorizer
|
|
def self.creatable_by?(user)
|
|
return false if ENV.key?('CONTENT_BLACKLIST') && ENV['CONTENT_BLACKLIST'].split(',').include?(user.email)
|
|
|
|
[
|
|
PermissionService.billing_plan_allows_extended_content?(user: user),
|
|
PermissionService.user_can_collaborate_in_universe_that_allows_extended_content?(user: user),
|
|
user.active_promo_codes.any?
|
|
].any?
|
|
end
|
|
end
|