-
Bug
-
Resolution: Not a bug
-
Low
-
None
-
3.1.7
I'm running into problems with most attempts to use the p2 component JSD API.
For example:
Lookup Service Desks for a given user
If a Portal User is registered and in the Service Desk Customers role, I would expect the following to return an actual value:
PortalService ps ComponentAccessor.getOSGiComponentInstanceOfType(PortalService.class); Portal portal = ps.getPortalForProject(portalUser, projectObj).getOrNull();
It returns a null with a left() error of:
Either.Left(AnError{httpStatusCode=403, errorCode=none(), message='sd.portal.error.permission : 'You do not have permission to view this Portal.''})
On the outside chance, I tried asserting that portalUser via JiraAuthenticationContext with identical results.
Using the alternate non-deprecated method search by ID:
PortalService ps ComponentAccessor.getOSGiComponentInstanceOfType(PortalService.class); Portal portal = ps.getPortalForId(portalUser, projectObj.getId()).getOrNull();
Same results...
I even tried this where the current (logged in user) and the 'target' user was the same user, an Agent in the target project, and still get null.
I can't see what could be done differently, if I'm missing something please point it out ![]()
At the very least, the error messages about lacking permissions really need more detail adding given the 'complex' nature of how that decision could be reached.
- is caused by
-
JSDSERVER-3962 JSD docs need to mention customer context prominently
- Gathering Interest
- is related to
-
JSDSERVER-3907 Unable to create comments using JSD API as the Portal User reporter
-
- Closed
-