| // Copyright 2025 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| // Detect whether the user is an internal user. | |
| import * as os from 'os'; | |
| /** | |
| * Returns true if the user is considered an internal user. | |
| */ | |
| export function isInternalUser(): boolean { | |
| const hostname = os.hostname(); | |
| if (hostname.endsWith('.c.googlers.com') || hostname.endsWith('.corp.google.com')) { | |
| return true; | |
| } | |
| return false; | |
| } |