core/tb: Implement TS checking rules
user: Add and use some IS_* macros (IS_OPER, etc.)
Merge branch 'master' into sam-upgrade