---
title: "userHasAccessToComment"
canonical: "https://support.appfire.com/space/PSCONF/15304780/userHasAccessToComment"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | userHasAccessToComment(userNameOrKey, commentId) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Verifies whether a comment is visible for a user.

Verifies whether a comment is visible for a user.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | userNameOrKey | String | Yes | User name or key of a user to check access for |
> | commentId | Number | Yes | Id of the comment to verify access to |

## Return Type

**Boolean (true/false) **

## Example

```javascript
userHasAccessToComment("jdoe", 651);
```

## See also

> Macro (contentbylabel)