Mailinglist Archive: yast-devel (81 mails)

< Previous Next >
Re: [yast-devel] [webYaST] what does your plugin do whan user lacks permissions? (bnc#592625)
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 1 Apr 2010 09:33:00 +0200
  • Message-id: <201004010933.01401.jreidinger@xxxxxxx>
Jiří Suchomel write:
Well,
when there's no read permission, selected plugin is not even opened and user
sees an error in the control panel.

When there are no write permissions, we usually open our plugin and just
disable the editable content, but without any message.

I've added shared partial missing_write_permissions, which you can use to
render from your code and that provides the common warning message. It
requires permissions hash as parameters (see webclient commit
013155be3559c8c73d842106b96b50a0e644ec49).

Feel free to adapt the text or css style if there's anything wrong with it.

Jiri




Hi, I little adapt it so it doesn't need permissions and always just render
default message. You should use it, because if allows to easy change in one
place message, together with style of this message.
Example of new usage: (disable is boolean which is true if user doesn't have
permission to write)
http://gitorious.org/opensuse/yast-web-client/commit/1f2d2df84f29346a03bb73be5a782d94591acb4b

Josef


--
Josef Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, parts of webyast
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
References