mirror of
https://github.com/altlinux/admc.git
synced 2025-03-24 06:50:13 +03:00
enable delete protection for new ou's by default
in create dialog for OU's, can still turn off if needed
This commit is contained in:
parent
e4e2c479a7
commit
8eebccae22
@ -191,6 +191,7 @@ CreateObjectDialog::CreateObjectDialog(const QString &parent_dn_arg, const QStri
|
||||
edits_layout->addRow(tr("Name:"), name_edit);
|
||||
|
||||
auto protect_deletion_edit = new ProtectDeletionEdit(&all_edits, this);
|
||||
protect_deletion_edit->set_enabled(true);
|
||||
protect_deletion_edit->add_to_layout(edits_layout);
|
||||
} else {
|
||||
qWarning() << "Class" << object_class << "is unsupported by create dialog";
|
||||
|
@ -42,6 +42,10 @@ ProtectDeletionEdit::ProtectDeletionEdit(QList<AttributeEdit *> *edits_out, QObj
|
||||
});
|
||||
}
|
||||
|
||||
void ProtectDeletionEdit::set_enabled(const bool enabled) {
|
||||
check->setChecked(enabled);
|
||||
}
|
||||
|
||||
void ProtectDeletionEdit::load_internal(AdInterface &ad, const AdObject &object) {
|
||||
const bool enabled = ad_security_get_protected_against_deletion(object, g_adconfig);
|
||||
|
||||
|
@ -36,6 +36,8 @@ public:
|
||||
ProtectDeletionEdit(QList<AttributeEdit *> *edits_out, QObject *parent);
|
||||
DECL_ATTRIBUTE_EDIT_VIRTUALS();
|
||||
|
||||
void set_enabled(const bool enabled);
|
||||
|
||||
private:
|
||||
QCheckBox *check;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user