public string setForumModeratorsSeniority(string forumName, int seniority, string requestingUser) { List <string> input = new List <string>() { forumName }; if (Constants.isValidInput(input) && seniority >= 0) { lock (o) { if (_um.getUserPermissionsForForum(forumName, requestingUser) != permission.SUPER_ADMIN && _um.getUserPermissionsForForum(forumName, requestingUser) != permission.ADMIN) { return("Unauthorized user"); } int minModeratorSeniority = _um.getMinModeratorSeniority(forumName); if (minModeratorSeniority < seniority) { return(Constants.ILLEGAL_ACTION); } if (!_fm.setForumModeratorsSeniority(forumName, seniority)) { return(Constants.forumDoesntExist(forumName)); } return(Constants.SUCCESS); } } return(Constants.INVALID_INPUT); }