-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Account profile management #2747
Account profile management #2747
Conversation
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.
@jonas-atmire : Overall, this PR looks fine to me. However, I didn't notice some minor things in the ITs, and I'm not sure I understand the changes to the EPersonRestRepository
itself, and the newly imported util class seems unused? (maybe I'm overlooking something though?)
dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
Show resolved
Hide resolved
|
||
String token = getAuthToken(ePerson.getEmail(), password); | ||
|
||
// updates password |
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.
Incorrect comment. Say something like: "// should be allowed (as an Eperson can update their own metadata), and eperson.firstname should be replaced.
|
||
String token = getAuthToken(ePerson2.getEmail(), password); | ||
|
||
// updates password |
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.
Incorrect comment. Should say something like // not allowed, as a non-Admin cannot modify other users
@@ -44,6 +45,9 @@ | |||
@Autowired | |||
AuthorizeService authorizeService; | |||
|
|||
@Autowired | |||
DSpaceObjectMetadataPatchUtils metadataPatchUtils; |
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.
It's unclear why this is now @Autowired
and imported into this class. I don't see any new code that uses it? Are these changes to EPersonRestRepository
necessary?
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.
You are correct @tdonohue, this should not be present in this part of the code (Seems to be a remnant of an older commit that has been overlooked)
I'll get these feedback-points looked at. Thanks for the review
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.
Hi @jonas-atmire
thanks for this PR, it looks mostly ok to me, I have added few inline comments to improve the ITs
...-webapp/src/main/java/org/dspace/app/rest/security/EPersonRestPermissionEvaluatorPlugin.java
Outdated
Show resolved
Hide resolved
dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
Show resolved
Hide resolved
dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
Show resolved
Hide resolved
dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
Show resolved
Hide resolved
dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
Show resolved
Hide resolved
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.
my feedback have been processed but unfortunately the latest commit have introduced a lot of unnecessary changes in the IT class due to formatting... I would like to have them reverted as otherwise they will cause conflict and more effort in coming PR about IT
@@ -54,7 +54,7 @@ public EPersonRestRepository(EPersonService dsoService) { | |||
|
|||
@Override | |||
protected EPersonRest createAndReturn(Context context) | |||
throws AuthorizeException { | |||
throws AuthorizeException { |
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.
there are only formatting change in this class, can you revert them please?
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 these seem like non-standard formatting changes. It'd be best to just revert all changes to EPersonRestRepository
. Could that be done quickly @jonas-atmire or @MarieVerdonck ?
3edff6e
to
bfabe86
Compare
1390070
to
0017f90
Compare
0017f90
to
36914e1
Compare
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.
👍 Looks good to me now. All feedback has been addressed. Thanks @jonas-atmire and @MarieVerdonck
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.
thanks for the cleanup, it looks better now!
This PR is related to the rest contract update mentioned in: DSpace/RestContract#113