How to automatically authorize in-app access of my controllers

15 views
Skip to first unread message

Steven Noble

unread,
Nov 25, 2015, 5:41:24 AM11/25/15
to declarative_authorization
My app often generates HTML, reads it, and turns it into a PDF.

So, a common pattern in my Sidekiq workers is something like this:

      require 'open-uri'
      url = "/model/id"
      html = open(url, &:read)
      html.do_something

Using Declarative Authorization, I know how to:

# make "/model/id' accessible to authorised users
# make "/model/id" inaccessible to everyone else

But how do I make it accessible to my Sidekiq workers?

Thanks,

Steven


Reply all
Reply to author
Forward
0 new messages