Skip to content

Commit

Permalink
fix forums permission
Browse files Browse the repository at this point in the history
  • Loading branch information
drusepth committed Dec 27, 2017
1 parent a8ab897 commit 0f33c98
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ def update_without_password(params, *options)
result
end

def forum_username
username = self.username.present? ? "@#{self.username}" : nil
username ||= self.name.present? ? self.name : nil
username ||= 'Anonymous Author'

username
end

private

# Attributes that are non-public, and should be blacklisted from any public
Expand All @@ -154,14 +162,6 @@ def blacklisted_attributes
]
end

def forum_username
username = self.username.present? ? "@#{self.username}" : nil
username ||= self.name.present? ? self.name : nil
username ||= 'Anonymous Author'

username
end

def deleted_at
nil #hack
end
Expand Down

0 comments on commit 0f33c98

Please sign in to comment.