So I guess it’s safer to not give default permissions to roles, but instead force all needed data sources to be explicitly setup for each role???
When I created a test user with a role, and the role had no default permissions, I got several errors each time I tried to log the user in, and had to add a new data source permission each time. While cumbersome, that may be safer than giving the role default permissions of full access on all data sources, right?
Another issue is what menus each role can see. It’s one thing to assign roles on data sources and another to limit the visible menus for each role.
If I (and ChatGPT) correctly understand your menu visibility methods, I need to add a top-level menu for each role and assign that to the role’s “Menu” property. Is this correct? If so, that means I need to duplicate a bunch of menus that are shared between roles so both roles can see them. This is incredibly cumbersome. Please verify that this is how the current menu visibility scheme works.
I’d like to propose a more software-oriented way to do this: Since I know the user’s iUserKey value, I can use this to read the iRoleKey from the user’s iUser record, then make a setting saying which menu items a given role can see, then use this in the “Show If” field of the menu item. A single lookup in the “InitialSetup” function can give me this. I can query iUser in the query design window, so I should be able to query it in the server function also, right?
Since it would be more user friendly to keep my setting for available menus by role name rather than iRoleKey, would you be willing to give me the name of the roles table and the field names (mainly just the role key and role name), and can that be queried by me?
If you won’t give me the table and field names, I would need to get the role names from the Setup Roles screen, then somehow locate their IDs, which are not shown on that screen. It would be much easier if I can query the iUser table and the roles table at user login time. Perhaps you could add the iRoleKey field to the setup roles screen? This wouldn’t be needed if you let me query the Roles table.
If you can answer the bold questions, that would be very helpful.
Thanks so much…