Sha256: 0379740a941c428717c876b0ca6395a2468f5fd65fadec597a80e663da40f716

Contents?: true

Size: 885 Bytes

Versions: 22

Compression:

Stored size: 885 Bytes

Contents

h1. Note on licenses.

First, your design "note":https://github.com/kristianmandrup/tango/blob/permission_store/spec/tango/permission/PERMISSION_STORE.textile :

"Note that licenses are just named subsets of rules and can thus be reused for both roles and role_groups."

<pre>
class AdminPermit

  def set_permission_rules
    licenses :bloggers, :admins
    can :manage, User
  end
end
</pre>



<pre>
class BloggersLicense
  def enforce!
    can :manage, [Article, Post]
  end
end
</pre>

maybe rename method to use the same convention. Maybe the method name _enforce!_ is better? or _enforce_rules!_ perhaps?

User permissions:

<pre>
users:
  kmandrup:
    can:
      manage: [Article, Pot]
    cannot
      read: [Secret]
  stanislaw
    can:
      manage: all
</pre>

Rules for individual Users. They key needs to be a unique identifier for each user, either email or username.

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.8.5.1 spec/Note_on_licenses.textile
cantango-0.8.0 spec/Note_on_licenses.textile