Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
Re: [yast-devel] Re: [Bug 537200] [task] [fate 307141] Admin password and e-mail rest service
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Tue, 8 Sep 2009 14:51:08 +0200
  • Message-id: <20090908125108.GA24997@xxxxxxxxxxxxx>
* Jiří Suchomel <jsuchome@xxxxxxx> [Sep 08. 2009 14:37]:

singleton class Administrator

string password
list aliases

Why would aliases be a list ? I understand the request as "single email
address" to send mails to. And, is 'alias' the right name for this ?

I'm thinking about the implementation as an entry in /etc/aliases (we have
MailAliases.ycp for that). And here it is possible to assign multiple aliases
for one e-mail.

Ah, I see.

Naming the 'Administrator' attribute 'aliases' exposes too much of the
internal implementation. Administrator should rather have a
'forward_mail_to' field which, internally, is implemented using aliases.

Later, we would expose aliases via a separate REST model.

(access the system, probably using YaPI::USERS)


You don't need set/get prefixes in Ruby.

Ah, well, get_aliases is actually part of find method.

set_password and set_aliases are meant as a methods that actually access the
system (call YaPI or whatever), not that they just fill the variables.

Understood. In Ruby, 'setters' have an '=' attached.

So reading the aliases would be

foo = Administrator.aliases

and writing them

Administrator.aliases = foo

Or there can be one save method, handling both, but I thought more
can help testing.

Absolutely !

SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >