New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NXP-29759: Make the task endpoint use the UserManagerResolver #4384
NXP-29759: Make the task endpoint use the UserManagerResolver #4384
Conversation
View issue in JIRA: NXP-29759: Make the task endpoint use the UserManagerResolver |
e960bd4
to
4d92a07
Compare
4d92a07
to
bc7dd33
Compare
* complete informations on this principal (the missing attributes will be if the principal is an | ||
* Administrator and the groups he is in). | ||
*/ | ||
boolean isComplete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this kind of method on public and important API like that is an architecture change that should be discussed first. Please open a discussion on Slack in #team-platform
about this, because I'm really not sure it's the best way to move forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cc @nuxeo/platform
Apart from the architecture aspects I mentioned above, I don't understand from the patch who is the intended user of the new "isComplete" that is being returned in the JSON. Is there an associated ticket on the UI side that shows the goal? |
If we want to add additional flags to the principal, then two things:
|
…e into one flat record
The event service can now receive domainEventProducer contribution to convert Core events to Nuxeo Stream Records building a domain event stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @efge, nothing should be done in UserManagerResolver
. What about removing the public API but just use a simple flag in the underlying DocumentModel
through #putContextData
?
Could be done in UserManagerImpl#getUserModel
if fetchReferences
is false
, and then this flag will be read by the NuxeoPrincipalWriter
to set accordingly the isPartial
field?
.../nuxeo-routing-rest-api/src/test/java/org/nuxeo/ecm/restapi/server/WorkflowEndpointTest.java
Outdated
Show resolved
Hide resolved
The difference between a complete and a partial principal are that in the case where we don't want to fetch the references we can't tell the groups a principal is in and without the groups we can't determine if he is an Administrator. In this case we will have two incorrect entries for the principal: the groups will be empty and the isAdministrator value will be false, because without fetching the groups we have no way of knowing either one. For the second issue it could be done even inside the |
Fix for NXP-29759: Make the task endpoint use the UserManagerResolver