#41: Storage quota editable only by admin role

This commit is contained in:
jendib 2015-11-24 00:31:04 +01:00
parent 1cae964c09
commit 24ca81e91c

View File

@ -123,8 +123,7 @@ public class UserResource extends BaseResource {
@POST
public Response update(
@FormParam("password") String password,
@FormParam("email") String email,
@FormParam("storage_quota") String storageQuotaStr) {
@FormParam("email") String email) {
if (!authenticate()) {
throw new ForbiddenClientException();
@ -140,10 +139,6 @@ public class UserResource extends BaseResource {
if (email != null) {
user.setEmail(email);
}
if (StringUtils.isNotBlank(storageQuotaStr)) {
Long storageQuota = ValidationUtil.validateLong(storageQuotaStr, "storage_quota");
user.setStorageQuota(storageQuota);
}
user = userDao.update(user);
// Change the password