Revamped permission and role API