This topic is locked

Advanced Security Question

11/1/2008 6:03:05 PM
ASPRunnerPro General questions
M
mccreelake author

I have a table called Events. Users can edit events only by being granted permissions based on another table that specifies their ID and the event ID. I added the events table to my ASPRunner application and then customized the SQL with an inner join on the permissions table. In this way, I got a list of all events with an added field of user ID. I need to use the advanced security feature in ASPRunner to limit the list of events users can view to edit; however, when I go to select the OwnerID field in the advanced security dialog, I only see the original fields from the table even though the user ID field is in the view, etc.
I am using an MS SQL database so creating a view creates problems in not letting me edit the data. Any suggestions?

J
Jane 11/5/2008

Him
unfortunately you can't use joined fields as OwnerID in the ASPRunnerPro.

There are two workarounds:

  1. add UserID to the main table
  2. or assign permissions manually in the List page: After record processed and Edit page: Before process events on the Events tab.

M
mccreelake author 11/6/2008

Thanks Jane.
What kind of steps would I need to take to assign permissions manually? I just need a bit of a jump start on the code for that.

J
Jane 11/7/2008

Hi,
you need to construct WHERE clause in the List page: Before SQL query event manually and then add it to the main SQL query.

Here is just a sample:

strWhereClause = whereAdd(strWhereClause,"your where clause here")