• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Common application for different database users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Common application for different database users


  • Subject: Re: Common application for different database users
  • From: "Cheong Hee (Datasonic)" <email@hidden>
  • Date: Wed, 15 Aug 2007 17:05:38 +0800

Tobias
 
Thanks for the lead.  And yes, this is WO app and with apache redirection.  User will be required to log in via their own url for authentication and view their contents.   e.g.:
user from company A will log in through www.mydomain.com/userCompanyA, which in turn redirects them to www.mydomain.com/cgi-bin/WebObjects/myAppA. 
user from company B will log in through www.mydomain.com/userCompanyB, which in turn redirects them to www.mydomain.com/cgi-bin/WebObjects/myAppB. 
 
Both are pointing to the same application - MyApp, but different instances and database.  These are working fine, but I thought there must be a better way to maintain only one application MyApp, instead.  If I understood you, the following is possible by setting the cookies:
'domain.com/group_a/' redirect to: 'domain.com/cgi-bin/WebObjects/app.woa/wa/login?group=group_a' 
 
This is a my dump question, i supposed:  Rather than login.wo, how to set the url right when the first component to call is Main.wo?  It will be great and I could then retrieve them using formValues or cookieValues from the r-r loop.  And then initialize the database connection dictionary accordingly.
 
Also, is there any downside e.g. some of the browsers may block the cookies due to user setting?
 
Cheers
 
Cheong Hee
 
 
----- Original Message -----
From: Tobias Crawley
To: Cheong Hee (Datasonic)
Cc: email@hidden
Sent: Tuesday, August 14, 2007 8:18 PM
Subject: Re: Common application for different database users

Cheong:

Is this an application that requires the users to login to see any content? If so, I've handled this in an app by having a static login page for each group. The login page contains a hidden field that identifies the group, and each group has its own database. The login action uses the group identifier to look up group specific info (including the name of the group database) from a group wide database. The group's database is set in the session, then the login action verifies the user's credentials. Even if a user used another group's login page, they would still need a valid username and password for that group to access the content. Each group's login page was in a separate directory (domain.com/group_a/login, domain.com/group_b/login, etc. ), but after login, they all pointed to the same app path.

This wasn't a WO application, but if it was, I probably would have a apache redir rule to map: 'domain.com/group_a/' to: 'domain.com/cgi-bin/WebObjects/app.woa/wa/login?group=group_a' which would return a component based login page. I would also set the selected group as a cookie, so I could send the user back to the proper login page on session expiration, or if the user accessed domain.com/.

I'm sure setting the database on the fly from the session is easily doable in WO, though I've never done it. 

Of course, if your users are not required to log in to access the content, then not much of this is useful to your current situation.

Tobias

On Aug 13, 2007, at 11:16 PM, Cheong Hee (Datasonic) wrote:

I have the same application that is currently used by different group of
users (or company).  I did it in JavaMonitor and gave them different name
for application instances and initialized them with few own parameters in
JavaMonitor.  So that when each group of them will access through:
www.mydomain.com/aaa        after webserver redirection for group "aaa"
etc..
This made me maintains list of application instances.

The other option is to let user go to the common home page, and have a
selector to choose so that to differentiate the group of users.
 But this could be an issue, as it means other groups/companies are exposed
to anyone who go to the common home page.

Is there any better way of design so that the same application could be used
to access their own database, while not to create list of different
application instances in JavaMonitor?

Cheers

Cheong Hee


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


---
Tobias Crawley
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Common application for different database users
      • From: Tobias Crawley <email@hidden>
References: 
 >Common application for different database users (From: "Cheong Hee (Datasonic)" <email@hidden>)
 >Re: Common application for different database users (From: Tobias Crawley <email@hidden>)

  • Prev by Date: Re: Common application for different database users
  • Next by Date: Re: Common application for different database users
  • Previous by thread: Re: Common application for different database users
  • Next by thread: Re: Common application for different database users
  • Index(es):
    • Date
    • Thread