on 01-09-2007 4:10 AM
Hi All,
I am trying to retrive all subscriptions of a specific folder. But getting following exception :
<b>com.sapportals.wcm.repository.service.subscription.SubscriptionException: SubscriptionManager: Given user has insufficient rights to retrieve all subscriptions for a resource.</b>
Which rights are required to read all the subscriptions?
Bellow is code snippet I am using :
IUser user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
ResourceContext ctxt = new ResourceContext(user);
RID rid = RID.getRID("/foldername");
IResource res = ResourceFactory.getInstance().getResource(rid, ctxt);
if (res != null) {
SubscriptionUtils subscrUtil = new SubscriptionUtils();
ISubscriptionManager subscrMgr = subscrUtil.getSubscriptionManager(res);
ISubscriptionList subscrList = subscrMgr.getSubscriptions(ctxt, res.getRID(), true);
}
The default Service Permissions for a folder are typically set to Subscribe (Myself Only). Try setting the user's Service Permissions to 'Subscribe' or 'Subscribe (All)'. Then the user should be able to read all the subscriptions.
If you don't want to modify the user's Service Permissions, you can always use the cmadmin service user to retrieve the resource and read the subscriptions. Then there would be no permissions issues.
Hope this helps,
Fallon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.