We need to add ability to extract role logic to classes. Something like this:
module Post
module Roles
class Anonymous
def call(user, _)
user.id.nil?
end
end
end
class AnonymousAbilities
include Kan::Abilities
role :anonymous, Roles::Anonymous
register(:read, :edit, :delete) { false }
end
end
We need to add ability to extract role logic to classes. Something like this: