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