'Add allowing rules.
:param role: Role of this rule.
:param method: Method to allow in rule, include GET, POST, PUT etc.
:param resource: Resource also view function.
:param with_children: Allow role\'s children in rule as well
if with_children is `True`'

def allow(self, role, method, resource, with_children=True):

    if with_children:
        for r in role.get_children():
            permission = (r.name, method, resource)
            if (permission not in self._allowed):
                self._allowed.append(permission)
    permission = (role.name, method, resource)
    if (permission not in self._allowed):
        self._allowed.append(permission)
