Hide user settings on system with push button auth
This commit is contained in:
parent
4b4340d0b6
commit
b417525b4e
@ -42,6 +42,7 @@ SettingsPageBase {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.margins: Style.margins
|
Layout.margins: Style.margins
|
||||||
spacing: Style.margins
|
spacing: Style.margins
|
||||||
|
visible: !engine.jsonRpcClient.pushButtonAuthAvailable
|
||||||
ColorIcon {
|
ColorIcon {
|
||||||
size: Style.hugeIconSize
|
size: Style.hugeIconSize
|
||||||
source: "../images/account.svg"
|
source: "../images/account.svg"
|
||||||
@ -70,6 +71,7 @@ SettingsPageBase {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Change password")
|
text: qsTr("Change password")
|
||||||
iconName: "../images/key.svg"
|
iconName: "../images/key.svg"
|
||||||
|
visible: !engine.jsonRpcClient.pushButtonAuthAvailable
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var page = pageStack.push(changePasswordComponent)
|
var page = pageStack.push(changePasswordComponent)
|
||||||
page.confirmed.connect(function(newPassword) {
|
page.confirmed.connect(function(newPassword) {
|
||||||
@ -83,6 +85,7 @@ SettingsPageBase {
|
|||||||
text: qsTr("Edit user information")
|
text: qsTr("Edit user information")
|
||||||
iconName: "../images/edit.svg"
|
iconName: "../images/edit.svg"
|
||||||
onClicked: pageStack.push(editUserInfoComponent)
|
onClicked: pageStack.push(editUserInfoComponent)
|
||||||
|
visible: !engine.jsonRpcClient.pushButtonAuthAvailable
|
||||||
}
|
}
|
||||||
|
|
||||||
NymeaItemDelegate {
|
NymeaItemDelegate {
|
||||||
@ -96,13 +99,13 @@ SettingsPageBase {
|
|||||||
|
|
||||||
SettingsPageSectionHeader {
|
SettingsPageSectionHeader {
|
||||||
text: qsTr("Admin")
|
text: qsTr("Admin")
|
||||||
visible: userManager.userInfo.scopes & UserInfo.PermissionScopeAdmin
|
visible: (userManager.userInfo.scopes & UserInfo.PermissionScopeAdmin) && !engine.jsonRpcClient.pushButtonAuthAvailable
|
||||||
}
|
}
|
||||||
|
|
||||||
NymeaItemDelegate {
|
NymeaItemDelegate {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Manage users")
|
text: qsTr("Manage users")
|
||||||
visible: userManager.userInfo.scopes & UserInfo.PermissionScopeAdmin
|
visible: (userManager.userInfo.scopes & UserInfo.PermissionScopeAdmin) && !engine.jsonRpcClient.pushButtonAuthAvailable
|
||||||
iconName: "../images/contact-group.svg"
|
iconName: "../images/contact-group.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
pageStack.push(manageUsersComponent)
|
pageStack.push(manageUsersComponent)
|
||||||
|
|||||||
Reference in New Issue
Block a user