@fiss_cmd<EOL>def meth_set_acl(args):
acl_updates = [{"<STR_LIT:user>": user, "<STR_LIT>": args.role}for user in set(expand_fc_groups(args.users))if user != fapi.whoami()]<EOL>id = args.snapshot_id<EOL>if not id:<EOL><INDENT>r = fapi.list_repository_methods(namespace=args.namespace,<EOL>name=args.method)<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>versions = r.json()<EOL>if len(versions) == <NUM_LIT:0>:<EOL><INDENT>if fcconfig.verbosity:<EOL><INDENT>eprint("<STR_LIT>".format(args.namespace,<EOL>args.method))<EOL><DEDENT>return <NUM_LIT:1><EOL><DEDENT>latest = sorted(versions, key=lambda m: m['<STR_LIT>'])[-<NUM_LIT:1>]<EOL>id = latest['<STR_LIT>']<EOL><DEDENT>r = fapi.update_repository_method_acl(args.namespace, args.method, id,<EOL>acl_updates)<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>if fcconfig.verbosity:<EOL><INDENT>print("<STR_LIT>".format(args.namespace, args.method,<EOL>id))<EOL><DEDENT>return <NUM_LIT:0><EOL>
Assign an ACL role to a list of users for a workflow.