mirror of
https://github.com/sismics/docs.git
synced 2024-11-14 10:27:55 +01:00
#41: Storage quota editable only by admin role
This commit is contained in:
parent
1cae964c09
commit
24ca81e91c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user