feat: column based view on wide priv. tables (#9699)

* feat: column based view on wide priv. tables

* fix: add group/user

* feat: copy buttons to work on visible privs

* feat: show what's being copied in modal

* feat: optional title and message for category selector modal
This commit is contained in:
gasoved
2021-08-30 17:42:58 +03:00
committed by GitHub
parent e59d357533
commit 61f02f17d8
8 changed files with 119 additions and 60 deletions

View File

@@ -73,15 +73,15 @@ Categories.copyPrivilegesToChildren = async function (socket, data) {
const children = result[0];
for (const child of children) {
// eslint-disable-next-line no-await-in-loop
await copyPrivilegesToChildrenRecursive(data.cid, child, data.group);
await copyPrivilegesToChildrenRecursive(data.cid, child, data.group, data.filter);
}
};
async function copyPrivilegesToChildrenRecursive(parentCid, category, group) {
await categories.copyPrivilegesFrom(parentCid, category.cid, group);
async function copyPrivilegesToChildrenRecursive(parentCid, category, group, filter) {
await categories.copyPrivilegesFrom(parentCid, category.cid, group, filter);
for (const child of category.children) {
// eslint-disable-next-line no-await-in-loop
await copyPrivilegesToChildrenRecursive(parentCid, child, group);
await copyPrivilegesToChildrenRecursive(parentCid, child, group, filter);
}
}
@@ -90,7 +90,7 @@ Categories.copySettingsFrom = async function (socket, data) {
};
Categories.copyPrivilegesFrom = async function (socket, data) {
await categories.copyPrivilegesFrom(data.fromCid, data.toCid, data.group);
await categories.copyPrivilegesFrom(data.fromCid, data.toCid, data.group, data.filter);
};
Categories.copyPrivilegesToAllCategories = async function (socket, data) {
@@ -98,6 +98,6 @@ Categories.copyPrivilegesToAllCategories = async function (socket, data) {
cids = cids.filter(cid => parseInt(cid, 10) !== parseInt(data.cid, 10));
for (const toCid of cids) {
// eslint-disable-next-line no-await-in-loop
await categories.copyPrivilegesFrom(data.cid, toCid, data.group);
await categories.copyPrivilegesFrom(data.cid, toCid, data.group, data.filter);
}
};