Added methods to assign and remove permissions to JS SDK