Hidden users feature implemented

main
Inga 🏳‍🌈 14 years ago
parent 63a2d93463
commit 8802b8d03a
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      Builder/IISUploadHandler/build.txt
  3. 9
      Common/dataobjects/Post.cs
  4. 5
      Common/dataobjects/User.cs

@ -159,6 +159,15 @@ namespace FLocal.Common.dataobjects {
}
public XElement exportToXmlWithoutThread(UserContext context, bool includeParentPost, params XElement[] additional) {
if(context.account == null && this.poster.showPostsToUsers != User.ENUM_SHOWPOSTSTOUSERS_ALL) {
return null;
}
if(this.poster.showPostsToUsers == User.ENUM_SHOWPOSTSTOUSERS_NONE) {
return null;
}
XElement result = new XElement("post",
new XElement("id", this.id),
new XElement("poster", this.poster.exportToXmlForViewing(context)),

@ -10,6 +10,11 @@ using FLocal.Core.DB.conditions;
namespace FLocal.Common.dataobjects {
public class User : SqlObject<User> {
public const string ENUM_SHOWPOSTSTOUSERS_ALL = "All";
public const string ENUM_SHOWPOSTSTOUSERS_LOGGEDIN = "LoggedIn";
public const string ENUM_SHOWPOSTSTOUSERS_PRIVELEGED = "Priveleged";
public const string ENUM_SHOWPOSTSTOUSERS_NONE = "None";
public class TableSpec : ISqlObjectTableSpec {
public const string TABLE = "Users";
public const string FIELD_ID = "Id";

Loading…
Cancel
Save