mirror of https://gitee.com/bigwinds/arangodb
Fixed wrong permissions for rebalanceShards. (#10374)
This commit is contained in:
parent
4ebe84f512
commit
821509ef0f
|
@ -1365,9 +1365,10 @@ actions.defineHttp({
|
|||
}
|
||||
|
||||
// simon: RO is sufficient to rebalance shards for current db
|
||||
if (req.database !== '_system'/* || !req.isAdminUser*/) {
|
||||
if (!req.isAdminUser &&
|
||||
users.permission(req.user, req.database) !== 'rw') {
|
||||
actions.resultError(req, res, actions.HTTP_FORBIDDEN, 0,
|
||||
'only allowed for admins on the _system database');
|
||||
'only allowed for admins on the database');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue