Permissions and automated URL-Requests
Permalink
Hi,
I'm trying to make an easy workaround for a problem that, if executed well, should better be solved through a robust API. I know that. But just let my ask this question anyway:
I've got some custom single pages and controllers. They are visible only for administrators. Now I'd like to make some of the functionality availabe through an automated URL-request. Like this: An external tool sends an HTTP request (www.example.com/single_page/action/value/value). But this request fails, obviously, based on permissions. The external tool is not logged in.
Soooo… Can I give this request the permission it needs? Any idea on how I could make this work?
Thanks :)
I'm trying to make an easy workaround for a problem that, if executed well, should better be solved through a robust API. I know that. But just let my ask this question anyway:
I've got some custom single pages and controllers. They are visible only for administrators. Now I'd like to make some of the functionality availabe through an automated URL-request. Like this: An external tool sends an HTTP request (www.example.com/single_page/action/value/value). But this request fails, obviously, based on permissions. The external tool is not logged in.
Soooo… Can I give this request the permission it needs? Any idea on how I could make this work?
Thanks :)
You could write a tool to return the data from a URL.
I'm sorry, I don't quite follow. Could you elaborate a bit? Thanks!
A tool file responds to a URL, but outside of the usual page structure. Hence it can be used to, for example, just ready your database table and return some data JSON formatted.
So you could use a concrete5 tool to load up the data from a database query into an array, format that however your external page wants the data. Your external page can then get that URL for javascript (json format) or as a mini-document in an iframe, or many other formats if you are generating that document using php.
So you could use a concrete5 tool to load up the data from a database query into an array, format that however your external page wants the data. Your external page can then get that URL for javascript (json format) or as a mini-document in an iframe, or many other formats if you are generating that document using php.
Thanks, I'll think that through.