This topic is locked

Edit Inline for users diferrent levels

10/21/2009 11:14:50 PM
PHPRunner General questions
H
helvis2009 author

Good night ...
I am with the following doubts:

I have to edit records inline for users of different levels of access. For example:
USER LEVEL

JOAO 1

MARIA 2
COD CUSTOMER VALUE DISCOUNT

--------------------------------------------

001 MARIA DA SILVA 50.00 5%

002 PAULO PEREIRA 15.00 8%

003 JOSEFINA LOPES 20.00 7%
WHAT I WANT IS THE USER "JOAO" GET INLINE EDIT FIELDS 'CUSTOMER', 'VALUE', 'DISCOUNT' ...
AND USER 'MARIA' ONLY THE FIELD 'DISCOUNT' ..
WHERE CAN I SET THE FIELDS WHICH MAY BE EDITED FOR PARTICULAR LEVEL? THANKS ..

J
Jane 10/22/2009

Hi,
there are two ways:

  1. you can create custom views on the Datasource tables for different user levels, set up permissions for each custom view and assign different set of fields on the Choose fields tab.
  2. use simple edit page and show or hide fields on the edit page using Edit page: Before display event:

    http://www.asprunner.com/forums/topic/6196-how-to-hide-controls-on-addedit-pages/

H
helvis2009 author 10/22/2009

Hello my friend ...
I did as follows, put it in BEFORESHOWLIST EVENT ... THE CODE:

$ xt-> assign ( "DISCOUNT_fieldblock", $ _SESSION [ "GroupID "]=="5");
But I CONTINUOUS CHANGING THE FIELD "DISCOUNT" with users of 02 "GROUPID" AND I WANT TO ONLY ONE OF THEM COULD EDIT INLINE .. What am I wrong?

J
Jane 10/23/2009

Hi,
this code works for simple edit page, not for Inline edit.

H
helvis2009 author 10/23/2009

Hi,

then my friend, what is the code that I use to allow only one group of users to edit this field in inline?

thanks!

J
Jane 10/26/2009

Unfortunately it's impossible to show/hide fields for Inline Edit for different users.

As workaround you can create custom views on the Datasource tables for different user levels, set up permissions for each custom view and assign different set of fields on the Choose fields tab.