It is never allowed to fly over assemblies of people, however a C0 drone may be flown over uninvolved people if it cannot be avoided.

Suitable C-classes C0, C1, (C2 in low speed mode)
Subcategory A1, (A2)
Maximum altitude 120m AGL or less (Apply 1:1 rule for C2)
Flying over uninvolved people C0, C1 - should be avoided
C2 - not allowed, see 1:1 rule

Implementing regulation (EU) 2019/947
AMC1 UAS.OPEN.020(1) and (2) UAS operations in subcategory A1

(a) For UAS in class C1, before starting the UAS operation, the remote pilot should assess the area and should reasonably expect that no uninvolved person will be overflown. This evaluation should be made taking into account the configuration of the site of operation (e.g. the existence of roads, streets, pedestrian or bicycle paths), and the possibility to secure the site and the time of the day. In case of an unexpected overflight, the remote pilot should reduce as much as possible the duration of the overflight, for example, by flying the UAS in such a way that the distance between the UA and the uninvolved people increases, or by positioning the UAS over
a place where there are no uninvolved people.

(b) It is accepted that UAS in class C0 or privately built UAS with MTOMs less than 250 g may fly over uninvolved people; however, this should be avoided whenever possible, and where it is unavoidable, extreme caution should be used.

Definition of uninvolved persons:
Persons who are not participating in the UAS operation or who are not aware of the instructions and safety precautions given by the UAS operator.

You can find a complete definition in Cover Regulation in (EU) 2019/947, GM1 Article 2(18) Definitions.

Defintion of assemblies of people
(Cover regulation in (EU) 2019/947, GM1 Article 2(3) Definitions)

Assemblies of people have been defined by an objective criterion related to the possibility for an individual to move around in order to limit the consequences of an out-of-control UA. It was indeed difficult to propose a number of people above which this group of people would turn into an assembly of people: numbers were indeed proposed, but they showed quite a large variation. Qualitative examples of assemblies of people are:
(a) sport, cultural, religious or political events;
(b) beaches or parks on a sunny day;
(c) commercial streets during the opening hours of the shops; and
(d) ski resorts/tracks/lanes.