Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 02:50:52 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149700 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: modules partial editable by different groups?  (Read 389 times)
snark
Guest
« on: October 08, 2009, 10:26:01 AM »

I know how that with 'READONLY' a textfield can be set to a 'non editable' field.. but is is possible to connect this to a Usergroup.


Is there a way to get the following done:

I want a sortable module to be editable by two usergroups, but in a way that

- the first two fields can only be edited by group A and

- that field 3 and field 4 is editable by group B


It is for an orderstatusform where the ordering group can fill in an order and the manufacturing group can set the status.

example:
To prevent that the manufacturing group can edit the amount of the ordered items, it would be great if he doesnt have the rights to edit 'the other groups fields'


- - - -
some thing that does:

if usergroup = groupA;

<input type="text" name="textfield" id="textfield" value="abcde" READONLY />


if usergroup = groupB;

<input type="text" name="textfield" id="textfield" value="abcde" >





« Last Edit: October 08, 2009, 11:05:23 AM by snark » Logged
snark
Guest
« Reply #1 on: October 08, 2009, 01:55:47 PM »

I solved it myself

 cool


Code:
<?php if ($_SESSION['GROUP_ID'] == 2) { echo "READONLY";} else {echo "";}?>

Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!