mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 01:11:23 +00:00
fixed logical flaw in last commit
This commit is contained in:
parent
4ce05f2563
commit
839aae732a
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ class Ban < ActiveRecord::Base
|
|||
end
|
||||
|
||||
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'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue