Skip to content

Commit

Permalink
Correction of community auth logic
Browse files Browse the repository at this point in the history
  • Loading branch information
birdofpreyru committed Jun 7, 2017
1 parent 537be16 commit b668b99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/containers/tc-communities/Page/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ class Page extends Component {
// true, if is loading now, or if not started loading yet
const isNotLoaded = communityId !== this.props.meta.communityId;

if (this.props.profile && !isNotLoaded) {
const userGroupIds = this.props.profile.groups.map(item => item.id);
if ((this.props.profile || !this.props.meta.authorizedGroupIds) && !isNotLoaded) {
const userGroupIds = this.props.profile ? this.props.profile.groups.map(item => item.id) : [];
if (!this.props.meta.authorizedGroupIds ||
_.intersection(userGroupIds, this.props.meta.authorizedGroupIds || []).length) {
return (
Expand Down

0 comments on commit b668b99

Please sign in to comment.