Inspired by http://permissions-calculator.org/