CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Security accounts in two or more tables

Print topic Send  topic

Author Message
Razor Ent. Admin
Posted: 03/23/2004, 9:21 PM

Hi Folks,

I'm implementing a solution in CodeCharge, but the data model (naturally)
separates clients from employees within the system. However both clients
_and_ employees need to be able to login to the system.

I'd really prefer to still use CodeCharge's built-in security system. I'm
using PHP/MySQL, and MySQL doesn't support views as yet. Does anyone have a
solution to this problem?

Thanks in advance.

johny_f

Posts: 23
Posted: 03/23/2004, 10:55 PM

You want to have two separate "Security levels" tables:
Clients:
- users
- moderators
- admins...

Employees:
- users
- moderators
- admins...

Is that what you are trying to do?

or it might be enough to have one table:

-Users
-Users_advanced acces
-Employees
-Employees_advanced acces
Admin (no important who)
etc.
...
----------------------
In the second solution is enough to "uncheck" in "Project Settings->Security groups
Than you will get "equal" groups and you can add privillages to each page individually.

Hope this will help

Johny_f



_________________
Johny_f
View profile  Send private message
johny_f

Posts: 23
Posted: 03/23/2004, 10:57 PM

Sorry for text error - missing text

In the second solution is enough to "uncheck" Higher Level Inclusive of Lower Levels checkbox in "Project Settings->Security groups
Than you will get "equal" groups and you can add privillages to each page individually.


_________________
Johny_f
View profile  Send private message
Razor Ent. Admin
Posted: 03/24/2004, 3:01 PM

Hi There,

The former is correct - I need to have two separate tables. The reason is
that there is a great deal of other information specifically about clients
in the clients table, and about employees in the employees table. Therefore
the two tables must remain separate, but both clients and employees need to
be able to login to the system.

Thank in advance.

----- Original Message -----
From: "johny_f" <johny_f@forum.codecharge>
Newsgroups: codechargestudio.php
Sent: Tuesday, March 23, 2004 10:55 PM
Subject: RE: Security accounts in two or more tables


> You want to have two separate "Security levels" tables:
> Clients:
> - users
> - moderators
> - admins...
>
> Employees:
> - users
> - moderators
> - admins...
>
> Is that what you are trying to do?
>
> or it might be enough to have one table:
>
> -Users
> -Users_advanced acces
> -Employees
> -Employees_advanced acces
> Admin (no important who)
> etc.
> ..
> ----------------------
> In the second solution is enough to "uncheck" in "Project
Settings->Security groups
> Than you will get "equal" groups and you can add privillages to each page
individually.
>
> Hope this will help
>
> Johny_f
>
>
>
> _________________
> Johny_f
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


DonB
Posted: 03/24/2004, 3:05 PM

You should have one table with all the common fields for all "people", then
a second one with the unique/restricted "employee" data. This is the basic
"subtype" representation.

--
DonB

http://www.gotodon.com/ccbth


"Razor Ent. Admin" <decastell@hotmail.com> wrote in message
news:c3t3vj$s16$1@news.codecharge.com...
> Hi There,
>
> The former is correct - I need to have two separate tables. The reason is
> that there is a great deal of other information specifically about clients
> in the clients table, and about employees in the employees table.
Therefore
> the two tables must remain separate, but both clients and employees need
to
> be able to login to the system.
>
> Thank in advance.
>
> ----- Original Message -----
> From: "johny_f" <johny_f@forum.codecharge>
> Newsgroups: codechargestudio.php
> Sent: Tuesday, March 23, 2004 10:55 PM
> Subject: RE: Security accounts in two or more tables
>
>
> > You want to have two separate "Security levels" tables:
> > Clients:
> > - users
> > - moderators
> > - admins...
> >
> > Employees:
> > - users
> > - moderators
> > - admins...
> >
> > Is that what you are trying to do?
> >
> > or it might be enough to have one table:
> >
> > -Users
> > -Users_advanced acces
> > -Employees
> > -Employees_advanced acces
> > Admin (no important who)
> > etc.
> > ..
> > ----------------------
> > In the second solution is enough to "uncheck" in "Project
> Settings->Security groups
> > Than you will get "equal" groups and you can add privillages to each
page
> individually.
> >
> > Hope this will help
> >
> > Johny_f
> >
> >
> >
> > _________________
> > Johny_f
> > ---------------------------------------
> > Sent from YesSoftware forum
> > http://forums.codecharge.com/
> >
>
>
>

Razor Ent. Admin
Posted: 03/24/2004, 3:34 PM

Hi DonB,

Thanks for the reply. I'm leary about adding more complexity to the data
model than necessary. Although a number of designers like to use the
extended forms for database design, I find that it adds more code to every
part of the application. In the case of CodeCharge, even just editing an
employee record would mean editing two tables. Also, it ends up being a
one-to-one table relationship which I tend to avoid except in the case of
temporary data tables.

Is there any way to get CodeCharge to do the security lookup using a query
(i.e. using a "SELECT...UNION" statement) rather than just a straight table
lookup?

Thanks

"DonB" <~ccbth~@gotodon.com> wrote in message
news:c3t47a$srn$1@news.codecharge.com...
> You should have one table with all the common fields for all "people",
then
> a second one with the unique/restricted "employee" data. This is the
basic
> "subtype" representation.
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "Razor Ent. Admin" <decastell@hotmail.com> wrote in message
>news:c3t3vj$s16$1@news.codecharge.com...
> > Hi There,
> >
> > The former is correct - I need to have two separate tables. The reason
is
> > that there is a great deal of other information specifically about
clients
> > in the clients table, and about employees in the employees table.
> Therefore
> > the two tables must remain separate, but both clients and employees need
> to
> > be able to login to the system.
> >
> > Thank in advance.
> >
> > ----- Original Message -----
> > From: "johny_f" <johny_f@forum.codecharge>
> > Newsgroups: codechargestudio.php
> > Sent: Tuesday, March 23, 2004 10:55 PM
> > Subject: RE: Security accounts in two or more tables
> >
> >
> > > You want to have two separate "Security levels" tables:
> > > Clients:
> > > - users
> > > - moderators
> > > - admins...
> > >
> > > Employees:
> > > - users
> > > - moderators
> > > - admins...
> > >
> > > Is that what you are trying to do?
> > >
> > > or it might be enough to have one table:
> > >
> > > -Users
> > > -Users_advanced acces
> > > -Employees
> > > -Employees_advanced acces
> > > Admin (no important who)
> > > etc.
> > > ..
> > > ----------------------
> > > In the second solution is enough to "uncheck" in "Project
> > Settings->Security groups
> > > Than you will get "equal" groups and you can add privillages to each
> page
> > individually.
> > >
> > > Hope this will help
> > >
> > > Johny_f
> > >
> > >
> > >
> > > _________________
> > > Johny_f
> > > ---------------------------------------
> > > Sent from YesSoftware forum
> > > http://forums.codecharge.com/
> > >
> >
> >
> >
>
>

DonB
Posted: 03/24/2004, 4:08 PM

While I tend to follow the same design considerations you listed, this one
screams for two tables. You have seen the complexity it produces for the
form you are working on.

I think the only other good way to do what you want is with a view
containing the UNION. I was unsuccessful trying to get the parameters into
a UNION query in the CCS query builder. I might add that UNIONS are not
particularly efficient, although you may not have a huge number of records
in either table such that this would be an issue.

The other possibility would be a separate client vs. employee "home" page.
If there is also intranet vs. extranet partitioning of the website then this
would make a lot of sense to split it up that way.

--
DonB

http://www.gotodon.com/ccbth


"Razor Ent. Admin" <decastell@hotmail.com> wrote in message
news:c3t5tr$2jn$1@news.codecharge.com...
> Hi DonB,
>
> Thanks for the reply. I'm leary about adding more complexity to the data
> model than necessary. Although a number of designers like to use the
> extended forms for database design, I find that it adds more code to every
> part of the application. In the case of CodeCharge, even just editing an
> employee record would mean editing two tables. Also, it ends up being a
> one-to-one table relationship which I tend to avoid except in the case of
> temporary data tables.
>
> Is there any way to get CodeCharge to do the security lookup using a query
> (i.e. using a "SELECT...UNION" statement) rather than just a straight
table
> lookup?
>
> Thanks
>
> "DonB" <~ccbth~@gotodon.com> wrote in message
>news:c3t47a$srn$1@news.codecharge.com...
> > You should have one table with all the common fields for all "people",
> then
> > a second one with the unique/restricted "employee" data. This is the
> basic
> > "subtype" representation.
> >
> > --
> > DonB
> >
> > http://www.gotodon.com/ccbth
> >
> >
> > "Razor Ent. Admin" <decastell@hotmail.com> wrote in message
> >news:c3t3vj$s16$1@news.codecharge.com...
> > > Hi There,
> > >
> > > The former is correct - I need to have two separate tables. The reason
> is
> > > that there is a great deal of other information specifically about
> clients
> > > in the clients table, and about employees in the employees table.
> > Therefore
> > > the two tables must remain separate, but both clients and employees
need
> > to
> > > be able to login to the system.
> > >
> > > Thank in advance.
> > >
> > > ----- Original Message -----
> > > From: "johny_f" <johny_f@forum.codecharge>
> > > Newsgroups: codechargestudio.php
> > > Sent: Tuesday, March 23, 2004 10:55 PM
> > > Subject: RE: Security accounts in two or more tables
> > >
> > >
> > > > You want to have two separate "Security levels" tables:
> > > > Clients:
> > > > - users
> > > > - moderators
> > > > - admins...
> > > >
> > > > Employees:
> > > > - users
> > > > - moderators
> > > > - admins...
> > > >
> > > > Is that what you are trying to do?
> > > >
> > > > or it might be enough to have one table:
> > > >
> > > > -Users
> > > > -Users_advanced acces
> > > > -Employees
> > > > -Employees_advanced acces
> > > > Admin (no important who)
> > > > etc.
> > > > ..
> > > > ----------------------
> > > > In the second solution is enough to "uncheck" in "Project
> > > Settings->Security groups
> > > > Than you will get "equal" groups and you can add privillages to each
> > page
> > > individually.
> > > >
> > > > Hope this will help
> > > >
> > > > Johny_f
> > > >
> > > >
> > > >
> > > > _________________
> > > > Johny_f
> > > > ---------------------------------------
> > > > Sent from YesSoftware forum
> > > > http://forums.codecharge.com/
> > > >
> > >
> > >
> > >
> >
> >
>
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.