[FX.php List] One Form/Different Privileges

Gjermund Gusland Thorsen ggt667 at gmail.com
Thu Dec 28 15:51:08 MST 2006


Make an array that takes care of the options.

Sample array, perhaps you can make a more appealing array
to fit your solution, but here is an idea:

$userTypes = array( 'Developer' => 'rwxrwxrwx',
	'Admin1' => 'rwxrwxrwx',
	'Commisioner => '---r--rwx',
	'Coach' => '---r--rwx',
	'Team Parent' => '---r--rwx',
	'Individual Parent' => '---r--rwx'
);

You also need to have every user belong to one of the above categories.

ggt667

On 12/26/06, David Ness <dness at bondedbuilders.com> wrote:
> I know that on my solution, I chose the 'one big very complicated php
> page' approach, mostly because I then only have one page to maintain (so
> I believe it's actually *less* complicated than having multiple, similar
> pages to maintain in parallel). My main page is a form. As I need to
> maintain the form, adding new fields and moving elements around, I only
> have one page, and it's divs, to edit. For each field or button area on
> the form, I include all the logic for users of differing privileges.
>
> YMMV
>
>
> --
> David Ness,
> Database Systems Programmer
>
> Bonded Builders Warranty Group
> 1500 Kings Highway
> Port Charlotte, FL 33980
> 800.749.0381 x3123 (National Toll Free)
> 941.255.3274 x3123 (Local)
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan
> Schwartz
> Sent: Monday, December 25, 2006 10:50 AM
> To: FX.php Discussion List
> Subject: [FX.php List] One Form/Different Privileges
>
> Hi Folks,
>
> I'm working on my first project where there will be multiple levels of
> user and privileges to view and edit the same data set....and I'm
> looking for advise on approach.
>
> Big picture...is it better make one big very complicated php page,
> covering all the combinations of privileges, or, create multiple pages,
> each much more simple and modified for each particular privilege set?
>
> For reference, this is the Little League baseball registration project.
> Privileges would be:
>         - Developer: view all/edit all
>         - Admin1: View all/edit all
>         - Commisioner: view subset of records(all players in 1 of 6
> leagues)/ edit subset of fields
>         - Coach: view subset of records (All players in one team)/edit
> subset of fields
>         - Team Parent : view subset of records (All players in one
> team)/ edit subset of fields
>         - Individual Parent: view single record (their child only) /edit
> subset of fields.
>
> So, it's a matrix.
>
> I can easily show/restrict the records displayed using search
> parameters.  It's the display/no display and edit/no edit choices which
> are the challenge.
>
> Another idea, build the master page in sections populated with
> "includes" covering the various logical areas of data.  This way, the
> choices would be limited to display or not display the section, in two
> flavors: edit and no edit.
>
> Any suggestions?
>
> TIA,
>
> Jonathan
>
>
>
>
>
> --
>
> Jonathan Schwartz
> FileMaker 8 Certified  Developer
> Associate Member, FileMaker Solutions Alliance Schwartz & Company
> jonathan at eschwartz.com http://www.eschwartz.com http://www.exit445.com
> 415-381-1852
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list