* Fix FactoryBot/StaticAttributeDefinedDynamically and Metrics/LineLength * Fix RSpec/NotToNot: Prefer not_to over to_not * Fix RSpec/NotToNot: Prefer not_to over to_not and Metrics/LineLength * Fix Layout/MultilineMethodCallIndentation and Metrics/LineLength * Fix Naming/PredicateName * Fix Style/ConditionalAssignment * Avoid code climate error
13 lines
181 B
Ruby
13 lines
181 B
Ruby
class OrganizationPolicy < ApplicationPolicy
|
|
def create?
|
|
!user.banned
|
|
end
|
|
|
|
def update?
|
|
user.org_admin?(record)
|
|
end
|
|
|
|
def generate_new_secret?
|
|
update?
|
|
end
|
|
end
|