Warning, /network/kdenetwork-filesharing/samba/aclproperties/qml/ACEPage.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0002 // SPDX-FileCopyrightText: 2021-2022 Harald Sitter <sitter@kde.org>
0003
0004 import QtQuick 2.15
0005 import QtQuick.Layouts 1.15
0006 import QtQuick.Controls 2.15 as QQC2
0007 import org.kde.kirigami 2.19 as Kirigami
0008
0009 import org.kde.filesharing.samba.acl 1.0 as Samba
0010
0011 Kirigami.ScrollablePage {
0012 id: page
0013 required property var aceObject
0014
0015 component ACEObjectCheckBox: QQC2.CheckBox {
0016 property var objectProperty
0017 onToggled: page.aceObject[objectProperty] = checked
0018 // This is not bound, the user changes the checked state!
0019 Component.onCompleted: checked = aceObject[objectProperty]
0020 Layout.fillWidth: true
0021 }
0022
0023 ColumnLayout {
0024 Kirigami.InlineMessage {
0025 Layout.fillWidth: true
0026 visible: aceObject.inherited
0027 type: Kirigami.MessageType.Information
0028 text: i18nc("@info",
0029 "This permission entry was inherited from a parent container and can only be modified on that parent (e.g. a higher level directory).")
0030 }
0031
0032 ColumnLayout {
0033 enabled: !aceObject.inherited
0034 width: parent.width
0035 RowLayout {
0036 QQC2.Label { text: i18nc("@label", "Type:") }
0037 QQC2.ComboBox {
0038 model: Samba.Context.types
0039 textRole: "text"
0040 valueRole: "value"
0041 onActivated: aceObject.type = currentValue
0042 Component.onCompleted: currentIndex = indexOfValue(aceObject.type)
0043 }
0044 }
0045 RowLayout {
0046 QQC2.Label { text: i18nc("@label", "Applies to:") }
0047 QQC2.ComboBox {
0048 model: Samba.Context.inheritances
0049 textRole: "text"
0050 valueRole: "value"
0051 onActivated: aceObject.inheritance = currentValue
0052 Component.onCompleted: currentIndex = indexOfValue(aceObject.inheritance)
0053 }
0054 }
0055 ColumnLayout {
0056 Layout.leftMargin: Kirigami.Units.gridUnit
0057 ACEObjectCheckBox {
0058 objectProperty: "execute"
0059 text: i18nc("@option:check", "Traverse folder / execute file")
0060 }
0061 ACEObjectCheckBox {
0062 objectProperty: "readData"
0063 text: i18nc("@option:check", "List folder / read data")
0064 }
0065 ACEObjectCheckBox {
0066 objectProperty: "readAttributes"
0067 text: i18nc("@option:check", "Read attributes")
0068 }
0069 ACEObjectCheckBox {
0070 objectProperty: "readExtendedAttributes"
0071 text: i18nc("@option:check", "Read extended attributes")
0072 }
0073 ACEObjectCheckBox {
0074 objectProperty: "writeData"
0075 text: i18nc("@option:check", "Create files / write data")
0076 }
0077 ACEObjectCheckBox {
0078 objectProperty: "appendData"
0079 text: i18nc("@option:check", "Create folders / append data")
0080 }
0081 ACEObjectCheckBox {
0082 objectProperty: "writeAttributes"
0083 text: i18nc("@option:check", "Write attributes")
0084 }
0085 ACEObjectCheckBox {
0086 objectProperty: "writeExtendedAttributes"
0087 text: i18nc("@option:check", "Write extended attributes")
0088 }
0089 ACEObjectCheckBox {
0090 objectProperty: "canDeleteData"
0091 text: i18nc("@option:check", "Delete subfolders and files")
0092 }
0093 ACEObjectCheckBox{
0094 objectProperty: "canDelete"
0095 text: i18nc("@option:check", "Delete")
0096 }
0097 ACEObjectCheckBox {
0098 objectProperty: "readPermissions"
0099 text: i18nc("@option:check", "Read permissions")
0100 }
0101 ACEObjectCheckBox {
0102 objectProperty: "changePermissions"
0103 text: i18nc("@option:check", "Change permissions")
0104 }
0105 ACEObjectCheckBox {
0106 objectProperty: "takeOwnership"
0107 text: i18nc("@option:check", "Take ownership")
0108 }
0109 }
0110 ACEObjectCheckBox {
0111 objectProperty: "noPropagate"
0112 text: i18nc("@option:check", "Only apply these permissions to objects and/or containers within this container")
0113 }
0114 }
0115 }
0116 }