Skip to content

Commit

Permalink
May have broken it slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Aug 26, 2021
1 parent 28ab006 commit b209eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/community_user.rb
Expand Up @@ -57,7 +57,7 @@ def flag_score
## Privilege functions

def privilege?(internal_id, ignore_suspension: false, ignore_mod: false)
if (internal_id != 'mod' || !ignore_mod) && user.is_moderator
if (internal_id != 'mod' || ignore_mod) && user.is_moderator
return true # includes: privilege? 'mod'
end

Expand All @@ -80,7 +80,7 @@ def grant_privilege(internal_id)

def recalc_privilege(internal_id, sandbox: false)
# Do not recalculate privileges already granted
return true if privilege?(internal_id, ignore_suspension: true, ignore_mod: true)
return true if privilege?(internal_id, ignore_suspension: true, ignore_mod: false)

priv = Ability.where(internal_id: internal_id).first

Expand Down

0 comments on commit b209eb3

Please sign in to comment.