Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Possibility to get users with permission to some action #143

sunki opened this Issue · 2 comments

2 participants


First of all I'd like to thank Steffen for the great gem. We are using it now in many projects and it works great.

My current issue is to retrieve all users with permissions to perform read action on some records. I have to send notifications about any changes in records only to users that have access to them.

What I'm going to do right now:

# in models/ticket.rb
def send_notifications
  User.find_each do |user|
    permit? :read, :object => self, :user => user

I haven't find any clearer ways how to implement this in API docs. So could You give some assumptions how this can be made. Thanks a lot.


Interesting question. I don't think that this currently is possible. You'd need to take a similar approach as the generation of the queries for finding all objects that the current user is allowed to access (with_permission_to). However, the current code for that assumes that the user id is given and is static. I don't see a simple way of turning this inside out.

@sunki sunki closed this
@sunki sunki reopened this

Thanks. Please let me know if you come up with any solutions. Also I'd like to help with implementing such kind of feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.