public string unassignModerator(string forumName, string subForumName, string username, string requestingUser) { List <string> input = new List <string>() { forumName, subForumName, username, requestingUser }; if (Constants.isValidInput(input)) { lock (o) { int minNumOfModerators = _fm.getForumMinModerators(forumName); if (minNumOfModerators == -1) { return(Constants.forumDoesntExist(forumName)); } int currentAmountOfModerators = _um.getNumOfModerators(forumName, subForumName); if (currentAmountOfModerators <= minNumOfModerators) { return(Constants.ILLEGAL_ACTION); } bool onlyAssigningAdmin = _fm.getForumModUnassignmentPermissions(forumName) >= modUnassignmentPermission.ASSIGNING_ADMIN; return(_um.unassignModerator(forumName, subForumName, username, requestingUser, onlyAssigningAdmin)); } } return(Constants.INVALID_INPUT); }