Welcome, Guest. Please login or register.
March 18, 2010, 08:51:09 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem Website Baker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite .
110336 Posts in 15934 Topics by 9292 Members
Latest Member: a52de940fu
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  modules partial editable by different groups?
Pages: [1] Go Down Print
Author Topic: modules partial editable by different groups?  (Read 216 times)
snoork

Online Online

Posts: 268



« on: October 08, 2009, 11: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, 12:05:23 PM by snark » Logged
snoork

Online Online

Posts: 268



« Reply #1 on: October 08, 2009, 02: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.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!