You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Claudio Sanchez <cs...@caece.edu.ar> on 2004/03/19 01:51:33 UTC

[OT] Design Question

Hi all,

This is off-topic, but i hope that somebody helps me.

I have an application that use struts, spring and hibernate.
The security is based on roles using CMS (JdbcRealm over Tomcat 4.1.29)

The goal of this application is to manage contracts. Authorized users
creates contracts with supplier's data, start date, end date, etc.
Then the application send alarm e-mails to users, for example when a contrat
expire, etc.
For now everithing works fine. But I have a requirements to people the other
countrys use the application. Obviously people of a country can't manage or
view the information the other countrys (contracts, users, departments,
currencies, etc).

The easiest implementation is to have an instance of the application and
database for each country. But I dont like this. I'd like to have only one
instance to the application.

Another idea is separate only the database for country. For example
ArgentineanDB and MexicanDB. So when a user access to the application, he(o
she) enter his(or her) country and the application use the appropriate
database.
But i found a problem with this. ¿How to manage security? because now i have
the user and role tables in ArgentineanDB and MexicanDB. ¿Is possible change
dynamically (depending of the user's country) the user and role table use
for the CMS? I think that is not possible.
¿Is there a way to resolve this requirements without change the actual
user-role schema?

I'd like to hear another options

Thanks in advance,
Claudio Sanchez (apologize for my english)



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: [OT] Design Question

Posted by Marco Mistroni <mm...@waersystems.com>.
Hi,
	In my previous company I had exactly what you are talking about,
Access  and fields are restricted by country (and we had also different
Names for fields depending on the country - not internationalization,
just
Different name).

Solution adopted was to have only ONE database in which you store
permissions by country..
When your struts app has to display the data in the page, we look up
Database to see which fields you can display.... 

Hope this helps
Regards
	Marco

PS this of course involves writing a gui tool that writes in the
Database the permissions and modifies it. If you are using Hibernate 
Than that will save you a lot of time (you can reuse the framework
For both the GUI tool and the struts app)
Good luck!

-----Original Message-----
From: Claudio Sanchez [mailto:csanchez@caece.edu.ar] 
Sent: 19 March 2004 00:52
To: struts-user@jakarta.apache.org
Subject: [OT] Design Question

Hi all,

This is off-topic, but i hope that somebody helps me.

I have an application that use struts, spring and hibernate.
The security is based on roles using CMS (JdbcRealm over Tomcat 4.1.29)

The goal of this application is to manage contracts. Authorized users
creates contracts with supplier's data, start date, end date, etc.
Then the application send alarm e-mails to users, for example when a
contrat
expire, etc.
For now everithing works fine. But I have a requirements to people the
other
countrys use the application. Obviously people of a country can't manage
or
view the information the other countrys (contracts, users, departments,
currencies, etc).

The easiest implementation is to have an instance of the application and
database for each country. But I dont like this. I'd like to have only
one
instance to the application.

Another idea is separate only the database for country. For example
ArgentineanDB and MexicanDB. So when a user access to the application,
he(o
she) enter his(or her) country and the application use the appropriate
database.
But i found a problem with this. ¿How to manage security? because now i
have
the user and role tables in ArgentineanDB and MexicanDB. ¿Is possible
change
dynamically (depending of the user's country) the user and role table
use
for the CMS? I think that is not possible.
¿Is there a way to resolve this requirements without change the actual
user-role schema?

I'd like to hear another options

Thanks in advance,
Claudio Sanchez (apologize for my english)



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org