mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Admins should be able to create polls even when plugin is disabled.
This commit is contained in:
@@ -68,6 +68,12 @@ module PrettyText
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def get_current_user(user_id)
|
||||
user = User.find_by(id: user_id)
|
||||
staff = user ? user.staff? : false
|
||||
{ staff: staff }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@ function __lookupAvatar(p) {
|
||||
return __utils.avatarImg({size: "tiny", avatarTemplate: __helpers.avatar_template(p) }, __getURL);
|
||||
}
|
||||
|
||||
function __getCurrentUser(userId) {
|
||||
return __helpers.get_current_user(userId);
|
||||
}
|
||||
|
||||
I18n = {
|
||||
t: function(a,b) { return __helpers.t(a,b); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user