/// <summary>Set up the ACL for the user.</summary>
        /// <remarks>
        /// Set up the ACL for the user.
        /// <b>Important: this must run client-side as it needs
        /// to know the id:pass tuple for a user</b>
        /// </remarks>
        /// <param name="username">user name</param>
        /// <param name="perms">permissions</param>
        /// <returns>an ACL list</returns>
        /// <exception cref="System.IO.IOException">ACL creation/parsing problems</exception>
        public virtual IList <ACL> AclsForUser(string username, int perms)
        {
            IList <ACL>      clientACLs = GetClientAcls();
            RegistrySecurity security   = GetRegistrySecurity();

            if (security.IsSecureRegistry())
            {
                clientACLs.AddItem(security.CreateACLfromUsername(username, perms));
            }
            return(clientACLs);
        }