Skip to content

Commit

Permalink
feat(windows-installer): grant and validate agent user permissions (#206
Browse files Browse the repository at this point in the history
)



Signed-off-by: Jericho Tolentino <[email protected]>
  • Loading branch information
jericht authored Mar 21, 2024
1 parent 0b0c3e5 commit 0d8e3de
Show file tree
Hide file tree
Showing 5 changed files with 606 additions and 229 deletions.
14 changes: 13 additions & 1 deletion src/deadline_worker_agent/installer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def install() -> None:
farm_id=args.farm_id,
fleet_id=args.fleet_id,
region=args.region,
worker_agent_program=scripts_path,
install_service=args.install_service,
start_service=args.service_start,
confirm=args.confirmed,
allow_shutdown=args.allow_shutdown,
parser=arg_parser,
grant_required_access=args.grant_required_access,
)
if args.user:
installer_args.update(user_name=args.user)
Expand Down Expand Up @@ -104,6 +104,7 @@ class ParsedCommandLineArguments(Namespace):
install_service: bool
telemetry_opt_out: bool
vfs_install_path: str
grant_required_access: bool


def get_argument_parser() -> ArgumentParser: # pragma: no cover
Expand Down Expand Up @@ -191,5 +192,16 @@ def get_argument_parser() -> ArgumentParser: # pragma: no cover
required=False,
default=None,
)
parser.add_argument(
"--grant-required-access",
help=(
"Allows the installer to modify an existing user so that it can successfully run the worker agent. This will allow "
"the installer to add the user to the Administrators group and grant any missing user rights which are required to "
"run the worker agent. This option has no effect if a new user is created by the installer."
),
action="store_true",
required=False,
default=False,
)

return parser
Loading

0 comments on commit 0d8e3de

Please sign in to comment.