CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Security problem: allow only selected users

Print topic Send  topic

Author Message
Markie


Posts: 251
Posted: 01/19/2008, 3:16 AM

I'm making a page with content and only a select group of users is allowed to access this page. Of course, I have made a table with three groups of users (users = 1, administrators = 2 and webmasters = 3). But I have multiple groups of users (for example: pianists, clarinettists, trumpettists etc.). For example, I'm making a page with content for trumpettists. Now, all my users are user group 1. But I only want the trumpettists to be able to see the content of the trumpettists-page. If a clarinettist surfs to this page: "access denied".

In my MySQL table I have add a field for the group (Group: trumpettists, clarinettists or pianists).

What do I have to do to achieve what I want

thanks again !

Markie
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
DonB
Posted: 01/19/2008, 5:39 AM

I guess you need to redefine your groups so that everyone isn't a '1'.
Define the webmaster as 101, admins as 100 and anyone under 100 is a 'user'
of one kind or another.
Or, when they log in, define a session variable like 'trumpet' and put all
the trumpet pages in a folder with that name. Then redirect them away from
pages in that folder if their session variable isn't the same as the folder
name.
--
DonB

http://ccswiki.gotodon.net


"Markie" <Markie@forum.codecharge> wrote in message
news:54791dbf1bfe1c@news.codecharge.com...
> I'm making a page with content and only a select group of users is allowed
> to
> access this page. Of course, I have made a table with three groups of
> users
> (users = 1, administrators = 2 and webmasters = 3). But I have multiple
> groups
> of users (for example: pianists, clarinettists, trumpettists etc.). For
> example,
> I'm making a page with content for trumpettists. Now, all my users are
> user
> group 1. But I only want the trumpettists to be able to see the content of
> the
> trumpettists-page. If a clarinettist surfs to this page: "access denied".
>
> In my MySQL table I have add a field for the group (Group: trumpettists,
> clarinettists or pianists).
>
> What do I have to do to achieve what I want
>
> thanks again !
>
> Markie
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>

Markie


Posts: 251
Posted: 01/19/2008, 7:17 AM

Thanks ! The first option works for me (pianists group 20, clarinettists group 21 etc.)

Now, last question: how can I automatically redirect the users from the 'illegalGroup' to the logout page ?


Markie
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
ckroon

Posts: 869
Posted: 01/19/2008, 10:57 AM

Put the destination page in the "Access Denied Page" box in the pages Properties-> Data tab
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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