[TextField] Allow disabling reveal password button through KIOSK restriction
ClosedPublic

Authored by broulik on Dec 12 2016, 3:21 PM.

Details

Summary

This introduces a new lineedit_reveal_password restriction (similar to lineedit_text_completion) that disables the reveal password button on Plasma text fields, like the lock screen and WiFi password inputs.

Test Plan

Placed the following in kdeglobals

[KDE Action Restrictions]
lineedit_reveal_password=false

(will update docs at https://userbase.kde.org/KDE_System_Administration/Kiosk/Keys once this is in)

No longer got said button on the lock screen and click area for the textfield also was as if the button was never there. Without aforementioned restriction it behaves like before.

As discussed in D3616

Depends on https://git.reviewboard.kde.org/r/129642/

Needs additional patch in plasma-nm. KNewPasswordDialog is in KWidgetsAddons which cannot depend on KConfigCore (where KAuthorized) is and thus we cannot do this there. However, being able to restrict this in the most prominent places should be good enough™

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 8948.Dec 12 2016, 3:21 PM
broulik retitled this revision from to [TextField] Allow disabling reveal password button through KIOSK restriction.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R242 Plasma Framework (Library).
Restricted Application added a project: Plasma. · View Herald TranscriptDec 12 2016, 3:21 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik edited the test plan for this revision. (Show Details)Dec 12 2016, 3:21 PM
mart accepted this revision.Dec 13 2016, 11:11 AM
mart added a reviewer: mart.
mart added a subscriber: mart.
mart added inline comments.
src/declarativeimports/plasmacomponents/qml/TextField.qml
49 ↗(On Diff #8948)

instead of having a __ name, could also be a property of an object that's inside instead of the root object, so would be pretty much inaccessible from the outside

This revision is now accepted and ready to land.Dec 13 2016, 11:11 AM

could also be a property of an object that's inside instead of the root object

I also need to access it from the style and didn't want to randomly do control.someRandomObject.foo

This revision was automatically updated to reflect the committed changes.