Permalink
Browse files

FoodCandy #717 : Groups: posting isn't visible if you're not logged in

  • Loading branch information...
1 parent dbae720 commit 1ca7344613cfa68287dded47dbb8aa4c337f0088 @dblock committed Jan 16, 2010
Showing with 14 additions and 12 deletions.
  1. +14 −12 SnCore.Web/AccountGroupView.aspx.cs
@@ -95,15 +95,15 @@ public void Page_Load(object sender, EventArgs e)
linkRequests.NavigateUrl = string.Format("AccountGroupAccountRequestsManage.aspx?id={0}", AccountGroupId);
linkRequests.Visible = AccountGroup.IsPrivate && fGroupAdmin;
linkPictures.NavigateUrl = string.Format("AccountGroupPicturesManage.aspx?id={0}", AccountGroupId);
- linkPictures.Visible = fGroupMemberOrAdmin;
+ linkPictures.Visible = ! AccountGroup.IsPrivate || fGroupMemberOrAdmin;
linkMembers.NavigateUrl = string.Format("AccountGroupAccountsView.aspx?id={0}", AccountGroupId);
- linkMembers.Visible = fGroupMemberOrAdmin;
+ linkMembers.Visible = !AccountGroup.IsPrivate || fGroupMemberOrAdmin;
linkRequest.Visible = ! fGroupMember;
linkLeave.Visible = fGroupMember;
- discussionsView.Visible = fGroupMemberOrAdmin;
+ discussionsView.Visible = ! AccountGroup.IsPrivate || fGroupMemberOrAdmin;
linkInviteFriend.NavigateUrl = string.Format("AccountGroupAccountInvitationEdit.aspx?gid={0}", AccountGroupId);
linkInviteFriend.Visible = fGroupMemberOrAdmin;
- linkRelRss.Visible = fGroupMemberOrAdmin;
+ linkRelRss.Visible = ! AccountGroup.IsPrivate || fGroupMemberOrAdmin;
linkEditGroup.NavigateUrl = string.Format("AccountGroupEdit.aspx?id={0}&ReturnUrl={1}", AccountGroupId,
Renderer.UrlEncode(string.Format("AccountGroupView.aspx?id={0}", RequestId)));
@@ -136,9 +136,13 @@ public void Page_Load(object sender, EventArgs e)
: "Feature » Never Featured";
}
- if (!fGroupMember)
+ if (!SessionManager.IsLoggedIn)
+ {
+ noticeInfo.Info = "Log-in to participate in this group and post.";
+ }
+ else if (!fGroupMember)
{
- noticeInfo.Info = "Join this group to participate and access its discussion posts.";
+ noticeInfo.Info = "Join this group to participate and posts.";
}
// private / public
@@ -150,6 +154,7 @@ public void Page_Load(object sender, EventArgs e)
}
else
{
+ blogView.Visible = false;
ReportWarning("This is a private group. You must be a member to see it.");
}
@@ -159,12 +164,9 @@ public void Page_Load(object sender, EventArgs e)
picturesView.AccountGroupId = AccountGroupId;
accountsView.AccountGroupId = AccountGroupId;
- if (fGroupMemberOrAdmin)
- {
- placesView.AccountGroupId = AccountGroupId;
- discussionsView.ObjectId = RequestId;
- discussionsView.Type = "AccountGroup";
- }
+ placesView.AccountGroupId = AccountGroupId;
+ discussionsView.ObjectId = RequestId;
+ discussionsView.Type = "AccountGroup";
linkRelRss.NavigateUrl = string.Format("AccountGroupRss.aspx?id={0}", AccountGroupId);

0 comments on commit 1ca7344

Please sign in to comment.