Пример #1
0
        public ActionResult UpdateUsers(int id)
        {
            //Method Level Variable Declarations
            List <Exception>         excepts = new List <Exception>();
            GuacamoleDatabaseDeleter deleter = new GuacamoleDatabaseDeleter();

            return(Ok(deleter.DeleteConnectionGroup(id.ToString(), ref excepts)));
        }
Пример #2
0
        /// <summary>
        /// Deletes the specified connection group and user group.
        /// </summary>
        /// <param name="userId">User identifier.</param>
        /// <param name="groupName">Group name.</param>
        public void DeleteGroup(string userId, string groupName)
        {
            List <Exception>         excepts = new List <Exception>();
            GuacamoleDatabaseDeleter deleter = new GuacamoleDatabaseDeleter();

            deleter.DeleteUserGroup(groupName, ref excepts);
            deleter.DeleteConnectionGroup(groupName, ref excepts);

            if (excepts.Count == 0)
            {
                return;
            }
            else
            {
                Console.Write("Error");
                return;
            }
        }
Пример #3
0
        public async Task <IActionResult> DeleteGroup(GroupNameDto groupNameDto)
        {
            List <Exception>         excepts = new List <Exception>();
            GuacamoleDatabaseDeleter deleter = new GuacamoleDatabaseDeleter();

            deleter.DeleteUserGroup(groupNameDto.Name, ref excepts);
            deleter.DeleteConnectionGroup(groupNameDto.Name, ref excepts);

            if (excepts.Count == 0)
            {
                return(Ok());
            }
            else
            {
                var message = HandleErrors(excepts);
                return(BadRequest(message));
            }
        }