/// <summary> /// Returns all roles granted on the CA to the caller. /// </summary> /// <exception cref="UninitializedObjectException">The object is not properly initialized.</exception> /// <exception cref="ServerUnavailableException">CA server is not accessible via RPC/DCOM.</exception> /// <exception cref="UnauthorizedAccessException">The caller do not have at least <strong>Read</strong> permissions.</exception> /// <returns>Granted roles.</returns> public CARoleEnum GetMyRoles() { if (String.IsNullOrEmpty(ConfigString)) { throw new UninitializedObjectException(); } if (!IsAccessible) { ServerUnavailableException e = new ServerUnavailableException(DisplayName); e.Data.Add("Source", OfflineSource.DCOM); throw e; } CertAdmin = new CCertAdmin(); return((CARoleEnum)CertAdmin.GetMyRoles(ConfigString)); }
/// <summary> /// Returns all roles granted on the CA to the caller. /// </summary> /// <exception cref="UninitializedObjectException">The object is not properly initialized.</exception> /// <exception cref="ServerUnavailableException">CA server is not accessible via RPC/DCOM.</exception> /// <exception cref="UnauthorizedAccessException">The caller do not have at least <strong>Read</strong> permissions.</exception> /// <returns>Granted roles.</returns> public CertSrvClientRole GetMyRoles() { if (String.IsNullOrEmpty(ConfigString)) { throw new UninitializedObjectException(); } if (!IsAccessible) { ServerUnavailableException e = new ServerUnavailableException(DisplayName); e.Data.Add(nameof(e.Source), OfflineSource.DCOM); throw e; } var CertAdmin = new CCertAdmin(); return((CertSrvClientRole)CertAdmin.GetMyRoles(ConfigString)); }