Expose the current site notification (i.e. ThemeProvider.get_site_notification
logic) as an API.
The request.cookies
might be able to stay as it is, but likely should support those values being passed in as regular API params. The response.set_cookie
probably should be returned as response values.
Make sure the RAML api docs are updated.
How to deal with authorization? Can anonymous get the notification for any other user? Or just authorized user? Or should the user have any specific rights?
Standard rest API authorization should work fine. (It lets oauth or current user session work).
For access/rights, it should be just for the current user.
https://forge-allura.apache.org/p/allura/git/merge-requests/81/
Hi Denis,
This is looking pretty good, but some small improvements can be made:
c.user
. Can we set this one up the same way? By the way, it is nice for more "core" methods, e.g._get_site_notification
to have things likeuser
passed in instead of using the globals. So don't change that, just passc.api_token.user
/c.user
in as an argument._get_site_notification
calls which are very similar. It'd be nicer if it could be just one call (always passing in some user object)..raml
can you move the new section to the very end? It's not as important as the all the other tools, so better to have it show up last instead of first.https://forge-allura.apache.org/p/allura/git/merge-requests/83/