1
0
mirror of https://github.com/altlinux/admc.git synced 2025-03-22 14:50:36 +03:00

Reduce gpo tree gui interaction time

GPO permission syncronization is removed for fetched policy
tree items
This commit is contained in:
Semyon Knyazev 2024-12-20 01:05:33 +04:00
parent 4abb297d6c
commit 4ee95eca49

View File

@ -110,7 +110,12 @@ void PolicyImpl::selected_as_scope(const QModelIndex &index) {
// If they don't, offer to update GPT permissions.
const QString selected_gpo = index.data(PolicyRole_DN).toString();
bool ok = true;
const bool perms_ok = ad.gpo_check_perms(selected_gpo, &ok);
bool perms_ok = true;
const bool was_fetched = console_item_get_was_fetched(index);
// Dont check perms if item was already fetched. It helps to avoid excessive freezes.
if (!was_fetched) {
perms_ok = ad.gpo_check_perms(selected_gpo, &ok);
}
if (!perms_ok && ok) {
const QString title = tr("Incorrect permissions detected");