mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-02-10 18:20:53 +00:00
fixed logical flaw in last commit
This commit is contained in:
parent
035f15648a
commit
9989e840aa
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ class Ban < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_permission
|
def validate_permission
|
||||||
unless creator and (creator.admin? or (creator.gather_moderator? and self.ban_type == TYPE_GATHER))
|
unless creator.nil? or creator.admin? or (creator.gather_moderator? and self.ban_type == TYPE_GATHER)
|
||||||
errors.add :ban_type, 'Gather Moderators can only create gather bans'
|
errors.add :ban_type, 'Gather Moderators can only create gather bans'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue