precendence of  rules and permissions