You are viewing version 2.26 of the documentation, which is no longer maintained. For up-to-date documentation, see the latest version.

input.user

The input.user object is present in most packages. This object provides information about the user performing the action. This can be used to restrict actions by role.

The following function can be used in your policies to determine if a user has a particular role assigned to it:

hasRole(role){
    input.user.roles[_].name=role
}
Key Type Description
input.user.isAdmin boolean Is the user who started this pipeline an admin user
input.user.username string What is the user ID of the user that started this pipeline.
input.user.role[].name string The names of the roles assigned to the user. This only shows up if FIAT is configured to provide roles.
input.user.role[].source string The source that granted the user this role. If you have multiple sources defining roles in fiat, this can be used to differentiate between them.

Last modified July 28, 2021: (f3a804d)