Merge "Add command to allow setting of some permission flags from shell" into tm-dev