def _set(self, opts):
    if (opts.rbac_user is None):
        _exit_if_errors(['--rbac-username is required with the --set option'])
    if ((opts.rbac_pass is not None) and (opts.auth_domain == 'external')):
        _warning('--rbac-password cannot be used with the external auth domain')
        opts.rbac_pass = None
    if (opts.auth_domain is None):
        _exit_if_errors(['--auth-domain is required with the --set option'])
    (_, errors) = self.rest.set_rbac_user(opts.rbac_user, opts.rbac_pass, opts.rbac_name, opts.roles, opts.auth_domain, opts.groups)
    _exit_if_errors(errors)
    if ((opts.roles is not None) and ('query_external_access' in opts.roles)):
        _warning('Granting the query_external_access role permits execution of the N1QL function CURL() and may allow access to other network endpoints in the local network andthe Internet.')
    _success(f'User {opts.rbac_user} set')
def _set(self, opts):
    if (opts.rbac_user is None):
        _exit_if_errors(['--rbac-username is required with the --set option'])
    if ((opts.rbac_pass is not None) and (opts.auth_domain == 'external')):
        _warning('--rbac-password cannot be used with the external auth domain')
        opts.rbac_pass = None
    if (opts.auth_domain is None):
        _exit_if_errors(['--auth-domain is required with the --set option'])
    (_, errors) = self.rest.set_rbac_user(opts.rbac_user, opts.rbac_pass, opts.rbac_name, opts.roles, opts.auth_domain, opts.groups)
    _exit_if_errors(errors)
    if ((opts.roles is not None) and ('query_external_access' in opts.roles)):
        _warning('Granting the query_external_access role permits execution of the N1QL function CURL() and may allow access to other network endpoints in the local network andthe Internet.')
    _success(f'User {opts.rbac_user} set')