Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barbara/user info #1563

Merged
merged 8 commits into from Jan 30, 2017
Merged

Barbara/user info #1563

merged 8 commits into from Jan 30, 2017

Conversation

bborgesr
Copy link
Contributor

@bborgesr bborgesr commented Jan 27, 2017

This exports session$user (if it exists) to the client-side. It's accessible in the Shiny object: Shiny.user

@@ -631,7 +631,8 @@ var ShinyApp = function() {
});

addMessageHandler('config', function(message) {
this.config = message;
this.config = {workerId: message.workerId, sessionId: message.sessionId};
if (message.user != null) exports.user = message.user;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!= is on purpose (instead of !==) because it checks for both null and undefined (see here)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time please make a comment directly in the code to that effect.

@bborgesr
Copy link
Contributor Author

@wch @jcheng5 ready to merge (?) I checked that it works fine with SSP: if an app requires authentication Shiny.user shows up with the username; if it doesn't require authentication, there is no Shiny.user.

@jcheng5 jcheng5 merged commit 34ba85d into master Jan 30, 2017
@jcheng5 jcheng5 removed the review label Jan 30, 2017
@bborgesr bborgesr deleted the barbara/userInfo branch January 30, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants