The best way to extend Pier's user model?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The best way to extend Pier's user model?

Matthias Berth-2
Hello,


I want to give pier users additional attributes (first name, last
name, email, etc). So far I was creating a subclass of PUUser. Would
it be better to just extend PUUser by a few Magritte descriptions on
the class side?

When I load new versions of Pier-Unix-Security from Monticello, I
guess my additional description methods would be deleted again? And if
I put them into my own category *my-customizations (with a star in the
name), monticello would leave them alone?

And, on a related note, what if I want to change a method in Pier's
core (like PULogin class>>isValidIn:), how do I avoid that the next
load from monticello gives me that old version again?


Cheers

Matthias

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: The best way to extend Pier's user model?

Lukas Renggli-2
> I want to give pier users additional attributes (first name, last
> name, email, etc). So far I was creating a subclass of PUUser. Would
> it be better to just extend PUUser by a few Magritte descriptions on
> the class side?

Yes, that's usually easier.

> When I load new versions of Pier-Unix-Security from Monticello, I
> guess my additional description methods would be deleted again? And if
> I put them into my own category *my-customizations (with a star in the
> name), monticello would leave them alone?

Yes, you need to package your extensions properly. If you use a  
category name as you wrote, Monticello will leave your extensions  
alone when loading a new version of Pier-Unix-Security.

> And, on a related note, what if I want to change a method in Pier's
> core (like PULogin class>>isValidIn:), how do I avoid that the next
> load from monticello gives me that old version again?

Try to avoid that at all cost. If there is really no other way you  
can use the category naming *my-customizations-override. There are  
well known drawbacks and probably bugs with this, so better avoid it  
altogether.

Check the archive or ask in the Squeak mailing-list to learn more  
about Monticello and packaging in Squeak.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: The best way to extend Pier's user model?

Matthias Berth-2
Thanks a lot, Lukas. I've put a note on extending the user model in
the FAQs on the wiki
http://smallwiki.unibe.ch/smallwiki/pier/pierunixsecurity/

Matthias

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki