This topic is locked

Hide delete and edit controls from LIST PAGE

8/7/2019 9:45:43 AM
PHPRunner General questions
J
jonlp author

I understand that that is a way that I can hide (or disable) EDIT, DELETE and ADD controls from the LIST page using certain conditions on the login mechanism. However, I cannot find a way do that when I disable login page.
Here is what to do: if the value of PERMs field < 10 then I wish to disable the EDIT, DELETE and ADD controls from the LIST page. In other words, I wish to display the LIST page in READ-ONLY mode and prevent users from edit or delete any records in the table.
Any assistance on this will be greatly appreciated...
Thank you.

N
nagate816DevClub member 4/14/2020

I believe you uncheck the Edit Page, Add New and Delete record from the Pages to Build form.

fhumanes 4/15/2020

Hello:
For the cases that you indicate, I always try to solve it in the event "Get Table Permissions".
See if you can use a session variable for the condition.
Description

Occurs after table initialized.
Use this event to return an access mask for the table:

A - Add

D - Delete

E - Edit

S - List/View/Search

P - Print/Export

I - Import

M - Admin option - user can see all records in the table.
Parameters

$permissions - string containing the permissions calculated for a given user and table
Cheers,
Fernando