gws.plugin.model_value.current_user

Current user value.

Computes a string from the properties of the current user.

If format is configured, it is a Python format string that refers to the user object, e.g. "{user.displayName}_{user.isGuest}". Otherwise the user’s loginName is returned.

Example:

fields+ {
    name "updated_by"
    type "text"
    values+ {
        type "currentUser"
        format "{user.displayName}"
        forRead false
        forUpdate true
    }
}

Source code: gws.plugin.model_value.current_user

Package Contents

class gws.plugin.model_value.current_user.Config

Bases: gws.base.model.value.Config

Value derived from the current user.

format: str = ''

Format string for the user value.

class gws.plugin.model_value.current_user.Object

Bases: gws.base.model.value.Object

Current user value object.

format: str

Format string, empty to use the login name.

compute(field, feature, mc)
configure()