Lookup table not working

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
cdmak
User
Posts: 27

Lookup table not working

Post by cdmak »

Hello,

I have a editable view and in this view is a lookup table that accesses the users table, I'm filtering the userlevels table "access_level = '1'" so I only get those users in the "1" permissions group. If i'm logged in as admin the records populate in the Modal Dialog for lookup but if I'm logged in as a none admin user the modal lookup say no records found and only gives me only my user account in the lookup like it is using my userID for the lookup and it is not set to do that.. I think I ran into a big snag. Hope it's something simple.

Thanks.


kirondedshem
User
Posts: 642

Post by kirondedshem »

The user and userlevel tables normally have security constraints from phpmaker, so It might be that they still go as far as tracking it even in lookup table, Whta i always do is create another view out of the user account table containing user id and names, then use that for my lookups evrywhere.
for example
CREATE VIEW vw_user_account AS select id , concat_ws(' ',ifnull(first_name,''),ifnull(sir_name,'')) AS name,username, uswr_group_id from user_account;

then I use this for lookup.

Even when I need to allow other none admin users to maybe add/edit user accounts, I still dont use the main table I make an editable view out of it and use that instead.


cdmak
User
Posts: 27

Post by cdmak »

Hello kirondedshem,

Thank you I got it working with your help. Here's what I did and it works great, many thanks again!

  1. Make a new view for users.
  2. In Advanced Security I did not specify the User ID Field.
  3. Make a link in the Master/Detail users.id = user_account_lookup.id, now users can edit their own user account.

Thank You


alex
User
Posts: 266

Post by alex »

Hello!

"Advanced Security - User ID" -> select checkbox "Allow View All" for table "users", regenerate table "users" (v2020).


Post Reply