Session properties change throughout the lifecycle of the session, which is why they’e not called session parameters. A session (essentially) starts the moment a project is reached in a web browser (before any login takes place; you can see this yourself by examining your Gateway and looking in Status > Perspective Sessions. Now launch a project which requires authentication and you’ll see that there’s an active session, even though the user has not logged in.
The reason for using the startup session was I wanted to get the role(s), firstName, lastName. They’re used to grab extra info from our database to populate custom props. I wanted to grab that info before anything is seen to the user. The custom props are then used throughout the app.
What do you think is the best approach for that? Basically I don’t want a user to see information that they shouldn’t see.
Thank you! Security levels crossed my mind as well. Wasn’t sure if it would work and was trying to make some things generic.
One example is we have people associated with a specific “Territory” with specific information for that territory in a database. We grab the “Territory” by seeing the user from the session and then query our database to see what the “Territory” is for that user. Then there’s database queries made for that “Territory” that fill in things like line charts, bar chart, tables etc.
That’s why i was thinking the startup session would be best before any views are actually seen. But maybe it’s okay to grab that “Territory” information from the “StartUp” event on the initial view seen? I’m not quite sure where else to initiate that.
View startup is shorthand for the onStartup event that can be configured on views (and all other Perspective components, for that matter). There’s a bug where you sometimes don’t see the ‘Configure Events’ menu item when right clicking views - try the keyboard shortcut (Ctrl → J) or just click into the editing pane and then right click the view.