Skip to content

Metainformation for roles #29

@davydovanton

Description

@davydovanton

It will be really important to setup any meta information to role for abilities list. Now we want to allow developers setup it and in next iteration use it in roles or other places.

What API I see for setup meta information:

module Post
  class AnonymousAbilities
    include Kan::Abilities

    role :anonymous, metainformation: :here, other: :information, Roles::Anonymous.new
    register(:read, :edit, :delete) { false }
  end

  class AdminAbilities
    include Kan::Abilities

    role :admin, weight: 2, version: 1, Roles::Admin.new
    register(:read, :edit, :delete) { |_, _| true }
  end
end

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions