Show more information on CUPS auth dialog
ClosedPublic

Authored by michaelweghorn on Feb 1 2019, 5:02 PM.

Details

Summary

This extends 'KCupsPasswordDialog' so that a prompt text can be
set.
It is explicitly stated that authentication is required
by CUPS, which was not totally clear beforehand and
prompt information as passed via the CUPS
callback function is displayed in addition.

This e.g. makes clear what host the authentication
information is sent to.

BUGS: 397125

Test Plan

Set up a remote CUPS server that requires authentication
and modify '~/.cups/client.conf' so that it points to this server,
e.g. as described in https://bugs.kde.org/show_bug.cgi?id=397125#c6 .

Start print-manager and make sure the authentication dialog is clear
what the authentication is needed for and where the information is sent.

Diff Detail

Repository
R363 Print Manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
michaelweghorn created this revision.Feb 1 2019, 5:02 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptFeb 1 2019, 5:02 PM
michaelweghorn requested review of this revision.Feb 1 2019, 5:02 PM
dantti accepted this revision.Feb 1 2019, 5:12 PM

LGTM Thanks!

This revision is now accepted and ready to land.Feb 1 2019, 5:12 PM
ngraham accepted this revision.Feb 1 2019, 5:57 PM
ngraham added a subscriber: ngraham.

Very nice! +1 shipit!

Thanks for the super-quick review!

Can somebody please help me to ship it? I think I don't have the required permission - or I'm missing the understanding of how to properly do it. I just tried the following according to [1], but got a "Service not enabled" error for the push:

$ arc land --conduit-uri="https://phabricator.kde.org/"
Landing current branch 'arcpatch-D18648'.
 TARGET  Landing onto "master", the default target under git.
 REMOTE  Using remote "origin", the default remote under git.
You have untracked files in this working copy.

  Working copy: /mnt/data/development/git/print-manager/

  Untracked changes in working copy:
  (To ignore these changes, add them to ".git/info/exclude".)
    CMakeLists.txt.user
    build/
    tags

    Ignore these untracked files and continue? [y/N] y

 FETCH  Fetching origin/master...
This commit will be landed:

      - 1af1de1 Show more information on CUPS auth dialog

Landing revision 'D18648: Show more information on CUPS auth dialog'...
 BUILDS PASSED  Harbormaster builds for the active diff completed successfully.
 PUSHING  Pushing changes to "origin/master".
fatal: remote error: service not enabled: /print-manager.git
Usage Exception: Push failed! Fix the error and run "arc land" again.

[1] https://community.kde.org/Infrastructure/Phabricator#Step_3:_Land_your_diff

michaelweghorn reopened this revision.Feb 2 2019, 12:26 AM

(accidently closed the revision, so reopending it now)

This revision is now accepted and ready to land.Feb 2 2019, 12:26 AM

If you don't have a developer account, you can't push. But anyone else with a developer account can. As you used arcanist to send the patch, arc patch commits a patch with the correct authorship information (if people don't use arcanist, they need to provide those details separately).
I'm going to land this on master.

But I will follow up with a patch to remove this string puzzle:

passwordDialog->setPromptText(i18n("A CUPS connection requires authentication: \"") + QString::fromUtf8(prompt) + QStringLiteral("\""));

For future reference, please check:

https://api.kde.org/frameworks/ki18n/html/prg_guide.html#good_text
https://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles

This revision was automatically updated to reflect the committed changes.

Thanks a lot! I'll take a look at these links.