View source: R/userAttribute.R
userAttribute | R Documentation |
For apps running as containers particular environment variables must be defined for an orderly handling of dynamic user privileges. This function makes use of environmental variables defined by shinyproxy to provide available privileges for the shiny application.
These are helper function for userInfo
. When used without a
shiny session object calls to these functions is made without any arguments.
If redefining contexts is needed, please use userInfo
instead.
userAttribute(group, unit = NULL)
getUserEmail(shinySession = NULL, group = NULL)
getUserFullName(shinySession = NULL, group = NULL)
getUserGroups(shinySession = NULL, group = NULL)
getUserName(shinySession = NULL, group = NULL)
getUserPhone(shinySession = NULL, group = NULL)
getUserReshId(shinySession = NULL, group = NULL)
getUserRole(shinySession = NULL, group = NULL)
group |
Character string providing the name of the app R package name. The term "group" is used to relate to the environmental variable SHINYPROXY_USERGROUPS that corresponds to the apps a given user can access. Default value is NULL but should always be set when shiny app is run as a shinyproxy container. |
unit |
Integer providing the look-up unit id. Default value is NULL in
which case all privileges for |
shinySession |
A shiny session object. Default value is NULL |
Invisibly a list of user metadata and privileges:
The username for whom the privileges apply.
User full name
User phone number
User email
Group of which the user is a member.
Unit id under which the privileges are defined.
Organization id for the user.
Role of the user.
Name of the organization as defined under the unit id.
String with user attribute
# Requires a valid shiny session object
try(getUserEmail())
try(getUserEmail(shinySessionObject))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.