Advanced Search Error + User ID Security

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
MatteoAllix
User
Posts: 117

Advanced Search Error + User ID Security

Post by MatteoAllix »

Hello,
first question: I have enabled the extended search in a table of my database.
but when I go to click on the advanced search button I get an error message "Error 500: Internal server error".
The error comes out only on that table, on the other the search works perfectly.
Apparently it does not change anything between the table settings.
How can I solve?

Second question: is it possible to insert a second field in the advanced security -User ID? In the sense that I wish it was viewable by the user who created the record and by one called in at a later time.

Thanks,
Matteo


arbei
User
Posts: 9532

Post by arbei »

MatteoAllix wrote:
Hello,
first question: I have enabled the extended search in a table of my database.
but when I go to click on the advanced search button I get an error message "Error
500: Internal server error".
The error comes out only on that table, on the other the search works perfectly.
Apparently it does not change anything between the table settings.
How can I solve?

Can not simulate your problem, can you post the details of the error message?

Second question: is it possible to insert a second field in the advanced security
-User ID? In the sense that I wish it was viewable by the user who created the record
and by one called in at a later time.

UserID Security is to keep the user from accessing other's records, if you need to allow the user to view other user's records, You can enable the option "Allow View All" in [Security] -> [Advanced] -> [User ID].

Or you can also add the other user's ID in the "UserID_Loaded" Server Event.

Read the help file topic: "Server Events and Client Scripts" -> "UserID_Loaded" for more informaiton.


MatteoAllix
User
Posts: 117

Post by MatteoAllix »

arbei wrote:
MatteoAllix wrote:
Hello,
first question: I have enabled the extended search in a table of my database.
but when I go to click on the advanced search button I get an error message "Error
500: Internal server error".
The error comes out only on that table, on the other the search works perfectly.
Apparently it does not change anything between the table settings.
How can I solve?

Can not simulate your problem, can you post the details of the error message?

Okay, I see the error when I click on the button. There was a window in modal dialog with "Server Error 500: Internal Server Error".
I noticed that removing the code related to the coloring of the rows in the Row_Rendered this error no longer appears and the search works.

Second question: is it possible to insert a second field in the advanced security
-User ID? In the sense that I wish it was viewable by the user who created the
record
and by one called in at a later time.

UserID Security is to keep the user from accessing other's records, if you need to
allow the user to view other user's records, You can enable the option "Allow View
All" in [Security] -> [Advanced] -> [User ID].

Or you can also add the other user's ID in the "UserID_Loaded" Server Event.

Read the help file topic: "Server Events and Client Scripts" -> "UserID_Loaded" for
more informaiton.

I'll explain.
My requirement is to make each user read only his own records, but then there is a special type of user who can see the data of all users only for one table. Is it possible to manage it easily?


arbei
User
Posts: 9532

Post by arbei »

My requirement is to make each user read only his own records, but then there is a
special type of user who can see the data of all users only for one table. Is it
possible to manage it easily?

You can add your code to add all the other user's id to this user in UserID_Loaded Server Event.
So he/she can view all the records for this table.

For example:
if (CurrentPage.Name == "<Table Name>") {
AddUserID(<User ID>);
}

You can refer to the function LoadUserID() in aspnetfn.cs about how to loop and add the user id to the user.


Post Reply