Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Property Filter : get Resource Context (or current User)

Hi,

In order to access a resource, I need a ResourceContext.

But my filter is applied when a new resource is <b>created</b>. Hence, the method

IPropertyFilter.getResource()

returns

null

. So I can't get a resource context this way.

And if I want to create a new ResourceContext, I need the current user. But I don't know how I can retrieve it.

Thanks for any help.

Former Member
Former Member replied

Try this

IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();

IUser user = request.getUser();

ResourceContext resContext = new ResourceContext(user);

or

IUser user = WPUMFactory.getServiceUserFactory().getServiceUser("cmadminservice");

ResourceContext resContext = new ResourceContext(user);

Regards,

Prasanna Krishnamurthy

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question