Forum: Ruby on Rails Seperating Client and Internal Users

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ee7052b87b82257740f232a958c3d49e?d=identicon&s=25 Steve Tooke (Guest)
on 2006-04-27 13:10
(Received via mailing list)

I was wondering if anybody could give me some advice about the best
way to go about seperating client users from internal users.

I'm building an application which will give our clients a subdomain
with several user accounts which they can use to check the status of
their project with us, request services etc. User accounts should not
be shared across subdomains.

As well as these client users we also need to have internal users who
will manage the client accounts, these users will need access to
several or all of the client accounts.

I'd like to keep my Authentication as DRY as possible, but I'm a
little unsure of the best way of keeping the internal representation
of these different users seperate.

Would using Model inheritance work well here. Perhaps having a
ClientUser that belongs to a Client and having InternalUsers that
HABTM Clients? How easy would it be to reuse the authentication code?

Any ideas about how I could go about this would be apprecitated.

Best Regards,
Steve Tooke
6ef8cb7cd7cd58077f0b57e4fa49a969?d=identicon&s=25 Brian Hogan (Guest)
on 2006-04-27 15:08
(Received via mailing list)
Doing this in my system (similar to yours) was as simple as having a
on all the client pages that says "if the user is assigned to the
(manager, team member, etc) then they also can see the client side.)

Perhaps that approach is too simple for what you're doing, but it works
me... just a thought.
This topic is locked and can not be replied to.