Hide user admin settings for unprivileged users
This commit is contained in:
parent
46416b6432
commit
f18e65a74d
@ -100,13 +100,13 @@ SettingsPageBase {
|
|||||||
|
|
||||||
SettingsPageSectionHeader {
|
SettingsPageSectionHeader {
|
||||||
text: qsTr("Admin")
|
text: qsTr("Admin")
|
||||||
visible: (userManager.userInfo.scopes & UserInfo.PermissionScopeAdmin) && !engine.jsonRpcClient.pushButtonAuthAvailable
|
visible: NymeaUtils.hasPermissionScope(engine.jsonRpcClient.permissions, 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) && !engine.jsonRpcClient.pushButtonAuthAvailable
|
visible: NymeaUtils.hasPermissionScope(engine.jsonRpcClient.permissions, 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