Skip to content

Commit

Permalink
feat: add a new permission for reportFields
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Dec 13, 2023
1 parent 632c5c6 commit 9c694f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ const CONST = {
BETA_COMMENT_LINKING: 'commentLinking',
POLICY_ROOMS: 'policyRooms',
VIOLATIONS: 'violations',
REPORT_FIELDS: 'reportFields',
},
BUTTON_STATES: {
DEFAULT: 'default',
Expand Down
5 changes: 5 additions & 0 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ function canUseCommentLinking(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.BETA_COMMENT_LINKING) || canUseAllBetas(betas);
}

function canUseReportFields(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.REPORT_FIELDS) || canUseAllBetas(betas);
}

/**
* We're requiring you to be added to the policy rooms beta on dev,
* since contributors have been reporting a number of false issues related to the feature being under development.
Expand Down Expand Up @@ -45,4 +49,5 @@ export default {
canUsePolicyRooms,
canUseLinkPreviews,
canUseViolations,
canUseReportFields,
};

0 comments on commit 9c694f4

Please sign in to comment.