Commit e4efb208 authored by Martin Santangelo's avatar Martin Santangelo

(feat) async check view permission in group and blog screens

......@@ -252,6 +252,12 @@ export default class BlogsViewScreen extends Component {
const desc = this.props.blogsView.blog.description;
}
// check async update of permissions
if (!this.props.blogsView.blog.can(FLAG_VIEW, true)) {
this.props.navigation.goBack();
return null;
}
return (
<View style={[CS.flexContainer, CS.backgroundWhite]}>
{
......
......@@ -336,6 +336,12 @@ export default class GroupViewScreen extends Component {
return <CenteredLoading/>
}
// check async update of permissions
if (!group.can(FLAG_VIEW, true)) {
this.props.navigation.goBack();
return null;
}
const showPosterFab = this.props.groupView.tab === 'feed' && group.can(FLAG_CREATE_POST);
const memberActionSheet = this.state.memberActions ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment