Replaced var is_admin by admin
Removed the admin-only verification from has_permission()
Added is_allowed() which checks the given permission and also if is admin
Merge composer/master