mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 11:33:11 +00:00
improve the comments clarifying the null scenario
This commit is contained in:
@@ -92,7 +92,7 @@ public class AuthorizationRestRepository extends DSpaceRestRepository<Authorizat
|
|||||||
if (authorizationFeature == null) {
|
if (authorizationFeature == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// get the user specified identified by the id
|
// get the user specified identified by the id, can be null for anonymous
|
||||||
EPerson user;
|
EPerson user;
|
||||||
try {
|
try {
|
||||||
user = authorizationRestUtil.getEperson(context, id);
|
user = authorizationRestUtil.getEperson(context, id);
|
||||||
@@ -154,7 +154,7 @@ public class AuthorizationRestRepository extends DSpaceRestRepository<Authorizat
|
|||||||
}
|
}
|
||||||
|
|
||||||
EPerson currUser = context.getCurrentUser();
|
EPerson currUser = context.getCurrentUser();
|
||||||
// get the user specified in the requested parameters
|
// get the user specified in the requested parameters, can be null for anonymous
|
||||||
EPerson user = getUserFromRequestParameter(context, epersonUuid);
|
EPerson user = getUserFromRequestParameter(context, epersonUuid);
|
||||||
// Temporarily change the Context's current user in order to retrieve
|
// Temporarily change the Context's current user in order to retrieve
|
||||||
// authorizations based on that user
|
// authorizations based on that user
|
||||||
@@ -204,7 +204,7 @@ public class AuthorizationRestRepository extends DSpaceRestRepository<Authorizat
|
|||||||
}
|
}
|
||||||
|
|
||||||
EPerson currUser = context.getCurrentUser();
|
EPerson currUser = context.getCurrentUser();
|
||||||
// get the user specified in the requested parameters
|
// get the user specified in the requested parameters, can be null for anonymous
|
||||||
EPerson user = getUserFromRequestParameter(context, epersonUuid);
|
EPerson user = getUserFromRequestParameter(context, epersonUuid);
|
||||||
// Temporarily change the Context's current user in order to retrieve
|
// Temporarily change the Context's current user in order to retrieve
|
||||||
// authorizations based on that user
|
// authorizations based on that user
|
||||||
|
Reference in New Issue
Block a user