This topic is locked
[SOLVED]

 Missing admin link

5/3/2018 3:17:52 PM
ASPRunner.NET General questions
Pete K author

This is an odd one. I have been working on this app for a few weeks and just recently got to the security part. I'm using database users (rather than AD) and dynamic permissions. I went through all the steps, let ASPR.net build the tables and add an admin user, built and ran the app. I can log in as the admin, but I don't see the Admin link on my user menu -- only Log out and Change password. I have tried everything I can think of to fix this:

  • Full rebuild (several times)
  • Turned off security, deleted the tables and the user, went through all the security steps again
  • Verified that the admin user was in fact added to _ugmembers in GroupID -1

Finally I created a brand new app based on the same database doing nothing but setting up security, and that one works. So now I'm faced with either trying to add back all the views, settings, page mods, style mods, and event code to the new app or trying to figure out how I hosed the other one. I'd much rather figure this out.
Anyone ever seen this before? Any ideas on what might be the cause?

MK Frank R 5/3/2018



This is an odd one. I have been working on this app for a few weeks and just recently got to the security part. I'm using database users (rather than AD) and dynamic permissions. I went through all the steps, let ASPR.net build the tables and add an admin user, built and ran the app. I can log in as the admin, but I don't see the Admin link on my user menu -- only Log out and Change password. I have tried everything I can think of to fix this:

  • Full rebuild (several times)
  • Turned off security, deleted the tables and the user, went through all the security steps again
  • Verified that the admin user was in fact added to _ugmembers in GroupID -1
    [size="2"]Finally I created a brand new app based on the same database doing nothing but setting up security, and that one works. So now I'm faced with either trying to add back all the views, settings, page mods, style mods, and event code to the new app or trying to figure out how I hosed the other one. I'd much rather figure this out. [/size]
    [size="2"]Anyone ever seen this before? Any ideas on what might be the cause? [/size]


Even though you mentioned you verified the admin user, I would examine the contents of all the security tables comparing between the app that works and the app that doesn't. If that doesn't uncover it, this sounds like one to send to the Demo Account for Xlinesoft to look at. [If you don't have purchased support, I highly recommend it - they do a great job.]

A
Arkie 5/3/2018

I don't understand "don't see the Admin link on my user menu". Do you mean a List of _ugmenmbers and admin is not included in that List?

When you went to security, did you perhaps select Database and then click "Create new"?? and then add the admin user?
If you did, you will see a new table created which you'll have to select to be included in a compile. Probably named something like "yourappname_users". This will certainly cause the logout and change password conditions as you described.
Otherwise, yeah, something ain't right. If you selected one of your existing tables in security and then added Admin, it should certainly show up in your database.

admin 5/3/2018

@Pete,
if you can upload it to Demo Account we can take a look.

Pete K author 5/4/2018



Even though you mentioned you verified the admin user, I would examine the contents of all the security tables comparing between the app that works and the app that doesn't. If that doesn't uncover it, this sounds like one to send to the Demo Account for Xlinesoft to look at. [If you don't have purchased support, I highly recommend it - they do a great job.]



Yes, that was the main reason for creating the second app. I forgot to mention that. I did compare the tables and they are the same. Thanks for the suggestion.

Pete K author 5/4/2018



@Pete,
if you can upload it to Demo Account we can take a look.


Thanks, I'll do that.

Pete K author 5/7/2018

Well, I feel silly. After pestering Sergey with a support request and having him look at several things on his end, the problem all along was due to some bad code I had placed in the AfterSuccessfulLogin() event. I remember doing it at the end of

the day one day last week right before leaving work. Then it was a couple of days before I was able to get back into my project and I didn't notice the issue right away, so when I did finally notice it I had forgotten about the code modification.
So just in case anything similar happens, know that if you place any code in that event that bombs out, you may appear to have logged in but may not have the appropriate permissions.
As always, thanks to Sergey for his patient help.