Acting as admin when reading a web page programatically

14 views
Skip to first unread message

Steven Noble

unread,
Mar 3, 2016, 9:26:30 PM3/3/16
to declarative_authorization
In one of my sidekiq workers, I load a page that's only visible to admins, like this:

require 'open-uri'
html
= open(url, &:read)

How can I validate myself as an admin here so I am permitted to load the page?

Thanks,

Steven

Reply all
Reply to author
Forward
0 new messages