mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
Fix inheriting browser group settings
This commit is contained in:
parent
9dec5fa3ca
commit
9b36334cdc
3 changed files with 27 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2025 KeePassXC Team <team@keepassxc.org>
|
||||||
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
||||||
* Copyright (C) 2021 KeePassXC Team <team@keepassxc.org>
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -1128,6 +1128,24 @@ bool Group::resolveAutoTypeEnabled() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Group::resolveBrowserOptionEnabled(const QString& option) const
|
||||||
|
{
|
||||||
|
switch (resolveCustomDataTriState(option, true)) {
|
||||||
|
case Inherit:
|
||||||
|
if (!m_parent) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return m_parent->resolveBrowserOptionEnabled(option);
|
||||||
|
case Enable:
|
||||||
|
return true;
|
||||||
|
case Disable:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
Q_ASSERT(false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Entry* Group::addEntryWithPath(const QString& entryPath)
|
Entry* Group::addEntryWithPath(const QString& entryPath)
|
||||||
{
|
{
|
||||||
if (entryPath.isEmpty() || findEntryByPath(entryPath)) {
|
if (entryPath.isEmpty() || findEntryByPath(entryPath)) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2025 KeePassXC Team <team@keepassxc.org>
|
||||||
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
||||||
* Copyright (C) 2021 KeePassXC Team <team@keepassxc.org>
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -97,6 +97,7 @@ public:
|
||||||
Group::MergeMode mergeMode() const;
|
Group::MergeMode mergeMode() const;
|
||||||
bool resolveSearchingEnabled() const;
|
bool resolveSearchingEnabled() const;
|
||||||
bool resolveAutoTypeEnabled() const;
|
bool resolveAutoTypeEnabled() const;
|
||||||
|
bool resolveBrowserOptionEnabled(const QString& option) const;
|
||||||
Entry* lastTopVisibleEntry() const;
|
Entry* lastTopVisibleEntry() const;
|
||||||
bool isExpired() const;
|
bool isExpired() const;
|
||||||
bool isRecycled() const;
|
bool isRecycled() const;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2025 KeePassXC Team <team@keepassxc.org>
|
||||||
* Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
|
||||||
* Copyright (C) 2022 KeePassXC Team <team@keepassxc.org>
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -202,11 +202,11 @@ void EditGroupWidget::loadGroup(Group* group, bool create, const QSharedPointer<
|
||||||
|
|
||||||
auto parent = group->parentGroup();
|
auto parent = group->parentGroup();
|
||||||
if (parent) {
|
if (parent) {
|
||||||
inheritHideEntries = parent->resolveCustomDataTriState(BrowserService::OPTION_HIDE_ENTRY);
|
inheritHideEntries = parent->resolveBrowserOptionEnabled(BrowserService::OPTION_HIDE_ENTRY);
|
||||||
inheritSkipSubmit = parent->resolveCustomDataTriState(BrowserService::OPTION_SKIP_AUTO_SUBMIT);
|
inheritSkipSubmit = parent->resolveBrowserOptionEnabled(BrowserService::OPTION_SKIP_AUTO_SUBMIT);
|
||||||
inheritOnlyHttp = parent->resolveCustomDataTriState(BrowserService::OPTION_ONLY_HTTP_AUTH);
|
inheritOnlyHttp = parent->resolveBrowserOptionEnabled(BrowserService::OPTION_ONLY_HTTP_AUTH);
|
||||||
inheritNoHttp = parent->resolveCustomDataTriState(BrowserService::OPTION_NOT_HTTP_AUTH);
|
inheritNoHttp = parent->resolveBrowserOptionEnabled(BrowserService::OPTION_NOT_HTTP_AUTH);
|
||||||
inheritOmitWww = parent->resolveCustomDataTriState(BrowserService::OPTION_OMIT_WWW);
|
inheritOmitWww = parent->resolveBrowserOptionEnabled(BrowserService::OPTION_OMIT_WWW);
|
||||||
inheritRestrictKey = parent->resolveCustomDataString(BrowserService::OPTION_RESTRICT_KEY);
|
inheritRestrictKey = parent->resolveCustomDataString(BrowserService::OPTION_RESTRICT_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue