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.9.4.7 spec/Note_on_licenses.textile
cantango-0.9.4.6 spec/Note_on_licenses.textile
cantango-0.9.4.5 spec/Note_on_licenses.textile
cantango-0.9.4.3 spec/Note_on_licenses.textile
cantango-0.9.4.2 spec/Note_on_licenses.textile
cantango-0.9.4.1 spec/Note_on_licenses.textile
cantango-0.9.4 spec/Note_on_licenses.textile
cantango-0.9.3.2 spec/Note_on_licenses.textile
cantango-0.8.9.5 spec/Note_on_licenses.textile
cantango-0.8.9.4 spec/Note_on_licenses.textile
cantango-0.8.9.3 spec/Note_on_licenses.textile
cantango-0.8.9.2 spec/Note_on_licenses.textile
cantango-0.8.9.1 spec/Note_on_licenses.textile
cantango-0.8.9 spec/Note_on_licenses.textile
cantango-0.8.8.1 spec/Note_on_licenses.textile
cantango-0.8.8 spec/Note_on_licenses.textile
cantango-0.8.7 spec/Note_on_licenses.textile
cantango-0.8.6.2 spec/Note_on_licenses.textile
cantango-0.8.6.1 spec/Note_on_licenses.textile
cantango-0.8.6 spec/Note_on_licenses.textile