The Menus available to a person in User Mode seem to have changed and make more available than previously. Here is what I am seeing. I guess they changed with b9, but I am not sure when this happened.
The only item added is the Instrumentation menu. I see all the other menus in 10.1.2, too.
While connected in User-role mode, after clicking on Server Administration, and trying to see the list of databases (which is no longer permitted to users), the menus changed to what I expected User-role users would see:
It seems that b9 sometimes allows User-role users access to more than they should get. All the procedures and forms, Field/Morph, the Datasheet, and others items that I want to keep away from User-role users.
OK, I missed the “User Mode” (maybe because — as a single Panorama user — I never had to use different modes.)
Your comment, coming from a person as knowledgeable and careful as you, made me doubt my own recollection of other menus.
First of all, I did not make any changes to the menu bar code in b9. In fact, I don’t think any changes in the menu bar code have been made in 10.2 at all, except for adding the Instrumentation menu.
It took me a while to find the code that disables the menus when in user role – because I haven’t touched it since 2015! So no recent changes have been made. In fact, I couldn’t really remember if it actually worked this way, but yes, the menus should not appear in User role unless you have set up your custom menus to include them.
So I guess if you can confirm that this really is a problem, I’ll have to set up some test databases and see if I can duplicate the issue.
I guess I just became aware of the issue. The menu that shows up for a user-role user should be the restricted menu (the second one I posted above), but sometimes it is not. I think that is an important issue although not an urgent one. Eventually, I hope that this would be fixed.
I think this could potentially be a very urgent issue for some users. I’ve made a bug report.
However, this code has definitely not changed since 2015 (yeah for version control software!). Maybe this never worked correctly? The code looks correct however. If you can provide any additional details about when this happens. Also, if you see this happens, do the menus actually work when you click on them? I’m wondering if the menu bar might immediately fix itself when you click on it. Or, does switching to another window and back fix it (you hinted that you saw this happen at least once).
Do you have any non-shared databases in user mode? If so, do they show the same problem? You know, now that I think of that, there is some code related to initially displaying the menus when a database is opened that was changed with all the recent changes in how .Initialize and starting up sharing works. If that is the problem, then I’ll bet that clicking on the menu bar immediately fixes it, as I suggested above. Please let me know as that would suggest a direction for a fix.
I have not checked this carefully, but I think this has happened after switching the role to Administrator and then switching back. Occasionally I have needed to do something on a user’s computer that required Admin role, so I switch to Admin then switch back. After switching back, the menus show Admin menus. I have not reliably be able to get them to return to User-role menus. I even tried logging out entirely and logging back in in User role, but Admin menus persisted. The menus do work.
Will try to observe this more carefully to see what triggers the unwanted menus.
I have seen the same problem in non-shared databases. I just tried one: switched to user role, but the admin menus were still appearing.
Ok, that sounds like a helpful clue.
Did you leave the database open as you logged out and back in? If yes, does closing and re-opening the database bring back the correct menus?
I am trying this:
- Start with shared database logged into Admin Role.
- Switch to Site License, then Log out of account. (Two files closed that were locked to the account.)
- Close Database.
- Log in as User.
- Open Database.
Result: User-role menus appear.
Ok, so closing and then re-opening the database gives the correct menus? Am I understanding that correctly?
Ok, I think I see the problem. Panorama is only checking the database authorization when the database is opened, there is currently no provision for the user role to change mid-stream. This is a bug, and I will fix it, but it’s much less serious than I first thought as this should be a very rare occurrence for most users. On a computer that is always logged in as User, there will be no opportunity for the wrong menus to appear.
You should see the same problem in reverse – if you open a database while in a User role, then switch to Admin role, I believe you will still see the User role menus until you close and re-open the database. (I didn’t try this, but I’m sure that’s what will happen).
Oh, as you probably already realized, this is not new with b9, it was just never noticed before.
The behavior is not always consistent. Just now, I changed roles several times between user and administrator and the menus immediately updated. I repeated that in another database and the menus did not change. I don’t know why this was different, but I have a suspicion that this is related to the database entitlements or security.
Well, I think I’ve got enough so that I know where to look. At this point, I’m more puzzled that it would ever work, because it sure looks to me like it only checks the authorization when it opens the database, and then never again. But I think this is now narrowed down to small area of the code and I should be able to track it down.
Ok, this is strange. I thought I figured out what was going on, and made changes to the code to fix it. But before I compiled the changes, I made two databases with security settings to test it. And since I hadn’t actually tried to verify the problem before, I tested it. Oops! When I downgraded from Admin to User, the database that was set to change menus – did change menus. And the database that was set to open only for admin users immediately closed. In other words, everything worked as it should have, without me changing a line of code.
I then went ahead and compiled the changes and tried again. Everything still works. I’m going to leave the changes in because it sure looks to me like this is the way it should have been coded all along. But in testing, I see no difference.
So, I guess when the new version comes out, see if there are any changes in behavior for you.