User attributes in container apps running behind shinyproxy
Source:R/userAttribute.R
userAttribute.Rd
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.
Usage
userAttribute(unit = NULL, map_orgname = NULL)
getUserEmail(...)
getUserFullName(...)
getUserGroups(...)
getUserName(...)
getUserPhone(...)
getUserReshId(...)
getUserRole(...)
Value
Invisibly a list of user metadata and privileges:
- name
The username for whom the privileges apply.
- fullName
User full name
- phone
User phone number
User email
- unit
Unit id under which the privileges are defined.
- org
Organization id for the user.
- role
Role of the user.
- orgName
Name of the organization as defined under the unit id.
String with user attribute
Examples
# \donttest{
try(getUserEmail())
#> Error in userAttribute() :
#> Environmental variables FALK_EXTENDED_USER_RIGHTS and FALK_APP_ID must both be set!
# }