Fixed and closed #387: only namespace the user has access to are now displayed in Profile.aspx.
This commit is contained in:
parent
3100569339
commit
8fc1e66522
2 changed files with 12 additions and 6 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.1.407")]
|
[assembly: AssemblyVersion("3.0.1.408")]
|
||||||
[assembly: AssemblyFileVersion("3.0.1.407")]
|
[assembly: AssemblyFileVersion("3.0.1.408")]
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace ScrewTurn.Wiki {
|
||||||
public partial class UserProfile : BasePage {
|
public partial class UserProfile : BasePage {
|
||||||
|
|
||||||
private UserInfo currentUser;
|
private UserInfo currentUser;
|
||||||
|
private string[] currentGroups;
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e) {
|
protected void Page_Load(object sender, EventArgs e) {
|
||||||
Page.Title = Properties.Messages.ProfileTitle + " - " + Settings.WikiTitle;
|
Page.Title = Properties.Messages.ProfileTitle + " - " + Settings.WikiTitle;
|
||||||
|
@ -28,6 +29,7 @@ namespace ScrewTurn.Wiki {
|
||||||
}
|
}
|
||||||
|
|
||||||
currentUser = SessionFacade.GetCurrentUser();
|
currentUser = SessionFacade.GetCurrentUser();
|
||||||
|
currentGroups = SessionFacade.GetCurrentGroupNames();
|
||||||
|
|
||||||
if(currentUser.Username == "admin") {
|
if(currentUser.Username == "admin") {
|
||||||
// Admin only has language preferences, stored in a cookie
|
// Admin only has language preferences, stored in a cookie
|
||||||
|
@ -79,13 +81,17 @@ namespace ScrewTurn.Wiki {
|
||||||
foreach(ScrewTurn.Wiki.PluginFramework.NamespaceInfo ns in Pages.GetNamespaces()) {
|
foreach(ScrewTurn.Wiki.PluginFramework.NamespaceInfo ns in Pages.GetNamespaces()) {
|
||||||
Users.GetEmailNotification(currentUser, ns, out pageChanges, out discussionMessages);
|
Users.GetEmailNotification(currentUser, ns, out pageChanges, out discussionMessages);
|
||||||
|
|
||||||
|
if(AuthChecker.CheckActionForNamespace(ns, Actions.ForNamespaces.ReadPages, currentUser.Username, currentGroups)) {
|
||||||
lstPageChanges.Items.Add(new ListItem(ns.Name, ns.Name));
|
lstPageChanges.Items.Add(new ListItem(ns.Name, ns.Name));
|
||||||
lstPageChanges.Items[lstPageChanges.Items.Count - 1].Selected = pageChanges;
|
lstPageChanges.Items[lstPageChanges.Items.Count - 1].Selected = pageChanges;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(AuthChecker.CheckActionForNamespace(ns, Actions.ForNamespaces.ReadDiscussion, currentUser.Username, currentGroups)) {
|
||||||
lstDiscussionMessages.Items.Add(new ListItem(ns.Name, ns.Name));
|
lstDiscussionMessages.Items.Add(new ListItem(ns.Name, ns.Name));
|
||||||
lstDiscussionMessages.Items[lstPageChanges.Items.Count - 1].Selected = discussionMessages;
|
lstDiscussionMessages.Items[lstPageChanges.Items.Count - 1].Selected = discussionMessages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads language and time zone settings.
|
/// Loads language and time zone settings.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue