fix resource
add self to is_admin attribute in before_create function
fix tests