Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Portlet- or HttpServletRequest in DDMStorageAdapter.save(...)
Is it possible to get access to the Portlet- or HttpServletRequest in a DDMStorageAdapter.save(...) method? I need the browser-client IP-address.
Ciao
Thorsten
I don't think so - at least not every time: These APIs might as well be executed during batch execution, a timer, or other programmatic ways (e.g. in a Workflow), e.g. at times when there is no actual request - neither a Http- nor a Portlet-Request.
What's the problem you're trying to solve with that? If it's permission-related (e.g. only a certain IP-range can execute a certain function when logged in), I'd rather go with a "RoleContributor", which sets permissions programmatically. And then you can tie the permission for an operation to a role, which is granted or revoked based on the client's IP address.
Hi Olaf,
thank you for your answer. I've written my own CVS and Jira storage adapter as backend for forms. It would be nice to have the client ip included into the stored data. Maybe i could solve this problem via a custom form field.
Ciao
Thorsten
PS: I'm sorry i am not at the next CampusSource event.
Powered by Liferay™