Skip to content

Commit

Permalink
Merge pull request #32957 from allroundexperts/feat-32756
Browse files Browse the repository at this point in the history
feat: add a new permission for reportFields
  • Loading branch information
thienlnam authored Dec 13, 2023
2 parents af09896 + 9c694f4 commit 6039f5b
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 @@ -255,6 +255,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 6039f5b

Please sign in to comment.