If I understand your use case correctly, rephrased below, this plugin could be used for that.
Tasks belong to a client, but are internal or external. External ones the client can access, but internal ones only your staff can access, and the belongs_to relationship indicates that the task still "relates to" that client.
You could set up this plugin to use hardwired roles and write your own accepts_role?(role, user) method to be something like this:
class Task < ActiveRecord::Base
belongs_to :client, :class_name => "User"
def accepts_role?(role, user)
return true if user.is_staff?
case role
when "manager": user == client
else false
end
end
end
Then you could do
permit "manager of :task"
Anywhere you need to check for authorization. Read the docs for more details on that one.
Naturally if your client is a company which has_many users, or anything else, you'll need to change that implementation sketch.
Ian