**Describe what's wrong**

UDF functions are global objects. Creating or dropping them requires global level privilege.

- https://clickhouse.com/docs/en/sql-reference/statements/create/function/
- https://github.com/ClickHouse/ClickHouse/blob/14811a357e2136ff2940d791f2dbe59c65e87601/tests/integration/test_access_for_functions/test.py#L22

But "system.privileges" table reports DATABASE level for these privileges.

```
SELECT
    privilege,
    level
FROM system.privileges
WHERE CAST(privilege, 'text') LIKE '%FUNCTION%'

┌─privilege──────────────┬─level────┐
│ CREATE FUNCTION        │ DATABASE │
│ DROP FUNCTION          │ DATABASE │
│ SYSTEM RELOAD FUNCTION │ GLOBAL   │
└────────────────────────┴──────────┘
```

**Does it reproduce on recent release?**

Actual for the latest versions and master. In particular, for 21.12.4.1.

\
    M(addressToLine, "", GLOBAL, INTROSPECTION) \
    M(addressToLineWithInlines, "", GLOBAL, INTROSPECTION) \
    M(addressToSymbol, "", GLOBAL, INTROSPECTION) \
    M(demangle, "", GLOBAL, INTROSPECTION) \
    M(INTROSPECTION, "INTROSPECTION FUNCTIONS", GROUP, ALL) \
    \
    M(FILE, "", GLOBAL, SOURCES) \
    M(URL, "", GLOBAL, SOURCES) \
    M(REMOTE, "", GLOBAL, SOURCES) \
    M(MONGO, "", GLOBAL, SOURCES) \
    M(MYSQL, "", GLOBAL, SOURCES) \
    M(POSTGRES, "", GLOBAL, SOURCES) \
    M(SQLITE, "", GLOBAL, SOURCES) \
    M(ODBC, "", GLOBAL, SOURCES) \
    M(JDBC, "", GLOBAL, SOURCES) \
    M(HDFS, "", GLOBAL, SOURCES) \
    M(S3, "", GLOBAL, SOURCES) \
    M(SOURCES, "", GROUP, ALL) \
    \
    M(ALL, "ALL PRIVILEGES", GROUP, NONE)  \
    M(NONE, "USAGE, NO PRIVILEGES", GROUP, NONE) 
#define DECLARE_ACCESS_TYPE_ENUM_CONST(name, aliases, node_type, parent_group_name) \
    name,
    APPLY_FOR_ACCESS_TYPES(DECLARE_ACCESS_TYPE_ENUM_CONST)
#undef DECLARE_ACCESS_TYPE_ENUM_CONST
};
std::string_view toString(AccessType type);
}