[Kde-kiosk] restrictions in kjobviewer [auf Viren überprüft]
Martijn Klingens
klingens at kde.org
Sat Jan 15 21:39:22 CET 2005
On Friday 14 January 2005 18:21, Reinhard Hennig wrote:
> I couldn´t find a method to prevent users from viewing names of other
> users printed dokuments by opening the filter menu in kjobviewer
> and choosing "all printers". We cannot allow this because of a possible
> violation of the users privacy. The item "select printer->all printers"
> should be
> removed. Under all circumstances should the view restricted to the users
> printer queue.
> Does anyone have an idea ?
It sounded to me like you simply need to disable a single action, as described
in README.kiosk. However, it turns out to be a bit more complex than that.
This simply script shows all actions and their captions:
------
APP="kjobviewer"
dcop $APP $APP-mainwindow\#1 actions | while read ACTION
do
printf "%-20s" "$ACTION:"
dcop `dcop $APP $APP-mainwindow\#1 action "$ACTION"` text
done
------
This results in the following output:
------
plugin_priodown: &Decrease Priority
help_about_kde: About &KDE
help_about_app: &About KJobViewer
help_whats_this: What's &This?
file_close: &Close
plugin_ipp: &Job IPP Report...
job_resume: &Resume
refresh: Refresh
filter_modify: &Select Printer
job_hold: &Hold
job_move: &Move to Printer...
plugin_editjob: &Edit Attributes...
help_contents: KJobViewer &Handbook
file_quit: &Quit
plugin_prioup: &Increase Priority
job_remove: R&emove
help_report_bug: &Report Bug...
view_username: User Name
view_completed: &Toggle Completed Jobs
view_user_jobs: Show Only User Jobs
options_configure: &Configure KJobViewer...
job_restart: Res&tart
------
As you can see the option 'Select Printer' is there, but the items in the
submenu are not. And I couldn't find a way to get hold of those items
either. :(
Many thanks to Aaron Seigo for helping me figuring this one out, the rest of
the explanation below is also his credit because I couldn't get the action
restriction working, amongst other things :)
If you don't mind disabling the entire menu you can create an action
restriction for kjobviewer by putting this in kjobviewerrc:
------
[KDE Action Restrictions][$i]
action/filter_modify=false
------
The code seems to be using a KActionMenu, which doesn't allow disabling
individual items in the menu. It will need a fix in KDE first, but I doubt it
can be done in time for 3.4.
--
Martijn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-kiosk/attachments/20050115/f8524852/attachment.pgp
More information about the kde-kiosk
mailing list