H
|
houseofit author 3/18/2022 |
I tried a simple example from the manual and placed in "List Page : Before SQL" but it won't compile if (Security.getUserName() != "admin") If I even can't get the syntax right I have a problem :-) Hope you can help... Ps. Aren't there an event where I can add this query before everything so everything based on this table will be filtered... |
F
|
Frank R 3/18/2022 |
Please explain what you need to do more. Also, before you go down a road, read the whole Security chapter. It's highly likely you can achieve what you need with built-in security, with no code. |
![]() |
Sergey Kornilov admin 3/18/2022 |
You may want to check Avanced Security option "Users can see and edit their own data only". No coding is required. |
H
|
houseofit author 3/21/2022 |
Hi again The DB is not created/maintained by ASP runner so I can't quite change it. Records are created for some statistic use, and the user displays them in list and reports are created in ASP runnner. I have a source fields in the DB that tells where the data is from so what i want is that : User 1 : can see legeparken1 and legeparken 2 That selection should be made on views and reports based on what user it logged in. View from table is attached.
REgards Thomas T |
![]() |
Sergey Kornilov admin 3/21/2022 |
Use the technique specified in this article: |
T
|
Tuong Do 4/12/2022 |
Hi houseofit, query.addWhere need to be in After table initialized event You can not do it in Before SQL event |