Added permissions
Added saving of permissions