Added check for permission to manage metadata