-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add ability for admins to restrict who can post within rooms #19094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
48f0ad2
8e0a27f
18d7341
4db2308
ab2075d
45ca540
3766b5a
94d450a
eaa3b93
daf53e3
5cebc09
c9d1631
33f9ce2
c146e0f
ca68968
d6324d2
2a27962
a789f27
2a245b8
2596a29
326340a
6d71a73
aec2afb
d039b46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,6 +359,7 @@ class ReportScreen extends React.Component { | |
| report={this.props.report} | ||
| isComposerFullSize={this.props.isComposerFullSize} | ||
| onSubmitComment={this.onSubmitComment} | ||
| policies={this.props.policies} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is necessary. Correct me if I'm not seeing this properly, but I think the only reason that A very good reason not to pass around |
||
| /> | ||
| </> | ||
| )} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| import React from 'react'; | ||
| import _ from 'underscore'; | ||
| import CONST from '../../../CONST'; | ||
| import ScreenWrapper from '../../../components/ScreenWrapper'; | ||
| import HeaderWithCloseButton from '../../../components/HeaderWithCloseButton'; | ||
| import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; | ||
| import styles from '../../../styles/styles'; | ||
| import OptionsList from '../../../components/OptionsList'; | ||
| import Navigation from '../../../libs/Navigation/Navigation'; | ||
| import compose from '../../../libs/compose'; | ||
| import withReportOrNotFound from '../../home/report/withReportOrNotFound'; | ||
| import reportPropTypes from '../../reportPropTypes'; | ||
| import ROUTES from '../../../ROUTES'; | ||
| import * as Report from '../../../libs/actions/Report'; | ||
| import * as Expensicons from '../../../components/Icon/Expensicons'; | ||
| import themeColors from '../../../styles/themes/default'; | ||
|
|
||
| const propTypes = { | ||
| ...withLocalizePropTypes, | ||
|
|
||
| /** The report for which we are setting write capability */ | ||
| report: reportPropTypes.isRequired, | ||
| }; | ||
| const greenCheckmark = {src: Expensicons.Checkmark, color: themeColors.success}; | ||
|
|
||
| const WriteCapabilityPage = (props) => { | ||
| const writeCapabilityOptions = _.map(CONST.REPORT.WRITE_CAPABILITIES, (value) => ({ | ||
| value, | ||
| text: props.translate(`writeCapabilityPage.writeCapability.${value}`), | ||
| keyForList: value, | ||
|
|
||
| // Include the green checkmark icon to indicate the currently selected value | ||
| customIcon: value === (props.report.writeCapability || CONST.REPORT.WRITE_CAPABILITIES.ALL) ? greenCheckmark : null, | ||
|
|
||
| // This property will make the currently selected value have bold text | ||
| boldStyle: value === (props.report.writeCapability || CONST.REPORT.WRITE_CAPABILITIES.ALL), | ||
| })); | ||
|
|
||
| return ( | ||
| <ScreenWrapper includeSafeAreaPaddingBottom={false}> | ||
| <HeaderWithCloseButton | ||
| title={props.translate('writeCapabilityPage.label')} | ||
| shouldShowBackButton | ||
| onBackButtonPress={() => Navigation.navigate(ROUTES.getReportSettingsRoute(props.report.reportID))} | ||
| onCloseButtonPress={() => Navigation.dismissModal(true)} | ||
| /> | ||
| <OptionsList | ||
| sections={[{data: writeCapabilityOptions}]} | ||
| onSelectRow={(option) => Report.updateWriteCapabilityAndNavigate(props.report, option.value)} | ||
| hideSectionHeaders | ||
| optionHoveredStyle={{ | ||
| ...styles.hoveredComponentBG, | ||
| ...styles.mhn5, | ||
| ...styles.ph5, | ||
| }} | ||
| shouldHaveOptionSeparator | ||
| shouldDisableRowInnerPadding | ||
| contentContainerStyles={[styles.ph5]} | ||
| /> | ||
| </ScreenWrapper> | ||
| ); | ||
| }; | ||
|
|
||
| WriteCapabilityPage.displayName = 'WriteCapabilityPage'; | ||
| WriteCapabilityPage.propTypes = propTypes; | ||
|
|
||
| export default compose(withLocalize, withReportOrNotFound)(WriteCapabilityPage); |
Uh oh!
There was an error while loading. Please reload this page.