HomeDevCentral

Allow to get current process username

Description

Allow to get current process username

Summary:
Use case

Zed is an application which allows users
to upload content. As such, it needs to
help the site administrator to configure
existence and permissions of target folders.

This method is provided to be used there
to geenrate a help message with the user
who could be chowned the directory to,
to provide a better solution than a chmod 0777.

See T1678.

Implementation notes

The command whoami is available on Windows too,
but shows domain\user information, replacing the
domain by hostname when the account is local to
the machine. We filter the domain part out, to be
coherent with Linux and UNIX output.

Reviewers: dereckson

Reviewed By: dereckson

Subscribers: inidal, DorianWinty

Differential Revision: https://devcentral.nasqueron.org/D2499

Details

Provenance
derecksonAuthored on Feb 6 2022, 19:44
derecksonPushed on Feb 7 2022, 01:31
Reviewer
dereckson
Differential Revision
D2499: Allow to get current process username
Parents
rKOT36738ec67b53: WIP: EGPCS vs GPCS for environment
Branches
Unknown
Tags
Unknown
Tasks
T1678: Health check and reporting library