public
Description: A global setting editor extension for Radiant
Homepage:
Clone URL: git://github.com/Squeegy/radiant-settings.git
radiant-settings / lib / config_protection.rb
100644 13 lines (12 sloc) 0.189 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
module ConfigProtection
  def protected?
    key.match(/[p|P]assword/)
  end
  
  def protected_value
    if protected?
      return "********"
    else
      return value
    end
  end
end