From c88473d8c6908694de41c6f0ce65df4f7051c6d8 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Fri, 19 Nov 2010 14:06:16 +0000 Subject: [PATCH] Judges user group implemented --- Builder/IISMainHandler/build.txt | 2 +- Common/dataobjects/AccountSettings.cs | 4 ++-- Common/dataobjects/Moderator.cs | 2 +- Common/dataobjects/UserGroup.cs | 1 + static/css/global.css | 4 ++++ static/css/modern/global.css | 4 ++++ static/images/judge.gif | Bin 0 -> 861 bytes templates/Full/elems/Main.xslt | 3 +++ templates/Lite/elems/Main.xslt | 3 +++ templates/Modern/elems/Main.xslt | 21 +++------------------ 10 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 static/images/judge.gif diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index beec316..8542cbb 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1773 \ No newline at end of file +1779 \ No newline at end of file diff --git a/Common/dataobjects/AccountSettings.cs b/Common/dataobjects/AccountSettings.cs index f933cd5..d524664 100644 --- a/Common/dataobjects/AccountSettings.cs +++ b/Common/dataobjects/AccountSettings.cs @@ -118,9 +118,9 @@ namespace FLocal.Common.dataobjects { } public bool isPostVisible(Post post) { - if(post.poster.showPostsToUsers == User.ENUM_SHOWPOSTSTOUSERS_NONE) return false; - if(post.poster.showPostsToUsers == User.ENUM_SHOWPOSTSTOUSERS_PRIVELEGED) return false; if(post.layer.name == PostLayer.NAME_HIDDEN) return false; + if(post.poster.showPostsToUsers == User.ENUM_SHOWPOSTSTOUSERS_NONE) return false; + if(post.poster.showPostsToUsers == User.ENUM_SHOWPOSTSTOUSERS_PRIVELEGED) return this.account.user.userGroup.name == UserGroup.NAME_JUDGES || this.account.user.userGroup.name == UserGroup.NAME_ADMINISTRATORS; return true; } diff --git a/Common/dataobjects/Moderator.cs b/Common/dataobjects/Moderator.cs index daaddef..6387632 100644 --- a/Common/dataobjects/Moderator.cs +++ b/Common/dataobjects/Moderator.cs @@ -78,7 +78,7 @@ namespace FLocal.Common.dataobjects { //slight optimisation... if(board.administratorId == account.id) return true; UserGroup group = account.user.userGroup; - if(group.name != UserGroup.NAME_ADMINISTRATORS && group.name != UserGroup.NAME_MODERATORS) return false; + if(group.name != UserGroup.NAME_ADMINISTRATORS && group.name != UserGroup.NAME_MODERATORS && group.name != UserGroup.NAME_JUDGES) return false; if(!isModerator_cache.ContainsKey(account.id) || !isModerator_cache[account.id].ContainsKey(board.id)) { lock(isModerator_cache) { diff --git a/Common/dataobjects/UserGroup.cs b/Common/dataobjects/UserGroup.cs index b766a5d..9d002cf 100644 --- a/Common/dataobjects/UserGroup.cs +++ b/Common/dataobjects/UserGroup.cs @@ -11,6 +11,7 @@ namespace FLocal.Common.dataobjects { public class UserGroup : SqlObject { public const string NAME_MODERATORS = "Moderators"; + public const string NAME_JUDGES = "Judges"; public const string NAME_ADMINISTRATORS = "Administrators"; public class TableSpec : ISqlObjectTableSpec { diff --git a/static/css/global.css b/static/css/global.css index ae304ad..f1e4260 100644 --- a/static/css/global.css +++ b/static/css/global.css @@ -103,6 +103,10 @@ pre .UG_Administrators { color:black !important; } +.UG_Judges { + color:black !important; + background-color: white !important; +} p { margin:0em; } diff --git a/static/css/modern/global.css b/static/css/modern/global.css index 7496c74..3b2b6fc 100644 --- a/static/css/modern/global.css +++ b/static/css/modern/global.css @@ -99,6 +99,10 @@ pre .UG_Administrators { color:black !important; } +.UG_Judges { + color:black !important; + background-color:white !important; +} p { margin:0em; } diff --git a/static/images/judge.gif b/static/images/judge.gif new file mode 100644 index 0000000000000000000000000000000000000000..6ba80a011185e67dfebd6944678e34647b3871ca GIT binary patch literal 861 zcmZ?wbhEHb+|z`)L+!vF*zv34Nc0LBeqssYGrXgF}-Ktn^rf1vn( zhW}vdKalqy1b||rU^E1VO$cyUG4ON9cmzCXXy)LTi8(Og;h{DL8NQ4i3XhuFd32N3 jXiQvmtW(TBZA(R=($PLu!C5i^0g9)m8L+akFjxZsIrc6o literal 0 HcmV?d00001 diff --git a/templates/Full/elems/Main.xslt b/templates/Full/elems/Main.xslt index c76b96c..430592e 100644 --- a/templates/Full/elems/Main.xslt +++ b/templates/Full/elems/Main.xslt @@ -250,6 +250,9 @@ /Users/User//Info/ + + + diff --git a/templates/Lite/elems/Main.xslt b/templates/Lite/elems/Main.xslt index 83aca2f..3bbc2d1 100644 --- a/templates/Lite/elems/Main.xslt +++ b/templates/Lite/elems/Main.xslt @@ -234,6 +234,9 @@ /Users/User//Info/ + + ^J + ^A diff --git a/templates/Modern/elems/Main.xslt b/templates/Modern/elems/Main.xslt index 1833f29..da424e2 100644 --- a/templates/Modern/elems/Main.xslt +++ b/templates/Modern/elems/Main.xslt @@ -304,24 +304,9 @@ /Users/User//Info/ - - - Administrator - - - Moderator - - - - - - - - - separate - UG_ - - + + Judge + Administrator