Add permissions.
An example of this implementation is available at https://gist.github.com/TDLive/7a3c75530aea4d092cc0