異なる条件下で同じアクションを実行できるロールがいくつかあるとします。例えば:
role :beer_pong_player do
has_permission_on :cups, :to => : drink
if_attribute :scored_on => true
end
end
role :casual_party_attendee do
has_permission_on :cups, :to => :drink
if_attribute :thirsty => true
end
end
方法はありますか - current_user が許可されている場合 - これが真であるロールを知る方法はありますか (current_user が両方のロールを持っている場合)?
どうもありがとう。
(http://www.tzi.org/~sbartsch/declarative_authorization/master/ は declarative_authorization ドキュメントの URL です... 探し回っていますが、必要なものが見つかりません)