Added permissions checking, protecting access lists and groups