public void MakeAdminLine(string username) { MakeAdminRequest req = new MakeAdminRequest(username); string json = JsonConvert.SerializeObject(req); lines.Add(json); }
internal byte[] HandleMakeAdmin(string json) { MakeAdminRequest res = JsonConvert.DeserializeObject <MakeAdminRequest>(json); Tuple <bool, string> ans = userService.MakeAdmin(res.Username); string jsonAns = Seralize(new SuccessFailResponse(ans.Item1, ans.Item2)); return(security.Encrypt(jsonAns)); }
public void MakeAdmin(bool isAdmin, string userKey) { using (PoolItem <DirectoryService> connection = this.directoryServicePool.Take(NullValueHandling.Ignore)) { MakeAdminRequest request = new MakeAdminRequest(connection.Item, isAdmin, userKey); request.ExecuteWithRetry(RetryEvents.BackoffNotFound); } }