add owner to group and snapshot listings

while touching it, make columns and tbar in DataStoreContent.js
declarative members and remove the (now) unnecessary initComponent

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-05-29 15:09:01 +02:00
committed by Dietmar Maurer
parent 86e432b0b8
commit 04b0ca8b59
3 changed files with 63 additions and 60 deletions

View File

@ -130,8 +130,8 @@ fn list_groups(
let group = info.backup_dir.group();
let list_all = (user_privs & PRIV_DATASTORE_AUDIT) != 0;
let owner = datastore.get_owner(group)?;
if !list_all {
let owner = datastore.get_owner(group)?;
if owner != username { continue; }
}
@ -141,6 +141,7 @@ fn list_groups(
last_backup: info.backup_dir.backup_time().timestamp(),
backup_count: list.len() as u64,
files: info.files.clone(),
owner: Some(owner),
};
groups.push(result_item);
}
@ -329,8 +330,9 @@ pub fn list_snapshots (
}
let list_all = (user_privs & PRIV_DATASTORE_AUDIT) != 0;
let owner = datastore.get_owner(group)?;
if !list_all {
let owner = datastore.get_owner(group)?;
if owner != username { continue; }
}
@ -340,6 +342,7 @@ pub fn list_snapshots (
backup_time: info.backup_dir.backup_time().timestamp(),
files: info.files,
size: None,
owner: Some(owner),
};
if let Ok(index) = read_backup_index(&datastore, &info.backup_dir) {