create_tenant_allowed = (req) => {
  const required_role =
    +getRootState().getConfig("role_to_create_tenant") || 100;
  const user_role = req.user ? req.user.role_id : 100;
  return user_role <= required_role;
}
Check that user has role that allowed to create tenants
By default Admin role (id is 10) has rights to create tenants.
You can specify config variable "role_to_create_tenant" to overwrite this.
Note that only one role currently can have such rights simultaneously.
@param {object} req - Request
@returns {boolean} true if role has righs to create tenant