title: Rails 4 user roles and permissions
body: <p>I am writing a rails application for an organization. Every user may have 1 or more roles and can only access certain controller actions depending on those roles.</p>
  
  <p>For example, only <em>admins</em> can create, destroy and update certain fields of <code>User</code>s. Also, there are <code>Team</code>s which each have a <em>team leader</em>, and only the <em>team leader</em> can update certain information about the <code>Team</code> (like the member list, for example). However, <code>Admins</code> are the one who assign the <em>team leader</em> in the first place.</p>
  
  <p>The specific details of my scenario are not important, I merely hope I described the situation where there are many different roles and permissions.</p>
  
  <p>My question is: what gem to use? My first thought was CanCan, but the last commit was almost a year ago and there is no mention of Rails 4 compatibility. Is there a currently maintained alternative?</p>