Refined Device API: permissions, ACL, search and tests