mirror of
https://github.com/sismics/docs.git
synced 2024-11-25 15:17:57 +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
|
@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
|
||||||
|
Loading…
Reference in New Issue
Block a user